File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ export class CredentialStore implements vscode.Disposable {
103
103
let session : vscode . AuthenticationSession | undefined = undefined ;
104
104
let isNew : boolean = false ;
105
105
let usedScopes : string [ ] | undefined = SCOPES ;
106
+ const oldScopes = this . _scopes ;
107
+ const oldEnterpriseScopes = this . _scopesEnterprise ;
106
108
try {
107
109
// Set scopes before getting the session to prevent new session events from using the old scopes.
108
110
if ( authProviderId === AuthProvider . github ) {
@@ -115,6 +117,8 @@ export class CredentialStore implements vscode.Disposable {
115
117
session = result . session ;
116
118
isNew = result . isNew ;
117
119
} catch ( e ) {
120
+ this . _scopes = oldScopes ;
121
+ this . _scopesEnterprise = oldEnterpriseScopes ;
118
122
if ( getAuthSessionOptions . forceNewSession && ( e . message === 'User did not consent to login.' ) ) {
119
123
// There are cases where a forced login may not be 100% needed, so just continue as usual if
120
124
// the user didn't consent to the login prompt.
Original file line number Diff line number Diff line change @@ -894,7 +894,7 @@ export class FolderRepositoryManager implements vscode.Disposable {
894
894
const data = await githubRepository . getOrgTeams ( refreshKind ) ;
895
895
orgTeams . set ( githubRepository . remote . owner , data ) ;
896
896
} catch ( e ) {
897
- // ignore errors from getTeams
897
+ break ;
898
898
}
899
899
}
900
900
const allTeamsForOrg = orgTeams . get ( githubRepository . remote . owner ) ?? [ ] ;
You can’t perform that action at this time.
0 commit comments