Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update code settings only after login #381

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading