File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ export class CredentialStore implements vscode.Disposable {
103103 let session : vscode . AuthenticationSession | undefined = undefined ;
104104 let isNew : boolean = false ;
105105 let usedScopes : string [ ] | undefined = SCOPES ;
106+ const oldScopes = this . _scopes ;
107+ const oldEnterpriseScopes = this . _scopesEnterprise ;
106108 try {
107109 // Set scopes before getting the session to prevent new session events from using the old scopes.
108110 if ( authProviderId === AuthProvider . github ) {
@@ -115,6 +117,8 @@ export class CredentialStore implements vscode.Disposable {
115117 session = result . session ;
116118 isNew = result . isNew ;
117119 } catch ( e ) {
120+ this . _scopes = oldScopes ;
121+ this . _scopesEnterprise = oldEnterpriseScopes ;
118122 if ( getAuthSessionOptions . forceNewSession && ( e . message === 'User did not consent to login.' ) ) {
119123 // There are cases where a forced login may not be 100% needed, so just continue as usual if
120124 // 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 {
894894 const data = await githubRepository . getOrgTeams ( refreshKind ) ;
895895 orgTeams . set ( githubRepository . remote . owner , data ) ;
896896 } catch ( e ) {
897- // ignore errors from getTeams
897+ break ;
898898 }
899899 }
900900 const allTeamsForOrg = orgTeams . get ( githubRepository . remote . owner ) ?? [ ] ;
You can’t perform that action at this time.
0 commit comments