Skip to content

Commit

Permalink
fix: update code settings only after login (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch authored Oct 17, 2023
1 parent d93679d commit 185b605
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions src/snyk/base/modules/snykLib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default class SnykLib extends BaseSnykModule implements ISnykLib {

await this.contextService.setContext(SNYK_CONTEXT.AUTHENTICATING, false);
await this.contextService.setContext(SNYK_CONTEXT.LOGGEDIN, true);
await this.codeSettings.updateIsCodeEnabled();

if (!configuration.getFeaturesConfiguration()) {
return;
Expand Down
5 changes: 0 additions & 5 deletions src/snyk/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,7 @@ class SnykExtension extends SnykLib implements IExtension {
await this.languageServer.start();

// initialize contexts
const loggedIn = await configuration.getToken();
if (loggedIn != undefined) {
await this.contextService.setContext(SNYK_CONTEXT.LOGGEDIN, true);
}
await this.contextService.setContext(SNYK_CONTEXT.INITIALIZED, true);
await this.codeSettings.updateIsCodeEnabled();

// Actually start analysis
this.runScan();
Expand Down

0 comments on commit 185b605

Please sign in to comment.