Skip to content

Commit

Permalink
fix: delay crc-detection and init till after activation
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Golovin <[email protected]>
  • Loading branch information
dgolovin committed May 15, 2024
1 parent a2a650e commit 9dcb96b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let connectionFactoryDisposable: extensionApi.Disposable;

let crcVersion: CrcVersion | undefined;

export async function activate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
async function _activate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
const crcInstaller = new CrcInstall(extensionContext.storagePath);

crcVersion = await getCrcVersion();
Expand Down Expand Up @@ -190,6 +190,10 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
);
}

export async function activate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
_activate(extensionContext).catch(console.error);
}

async function registerCrcUpdate(
crcVersion: CrcVersion,
crcInstaller: CrcInstall,
Expand Down

0 comments on commit 9dcb96b

Please sign in to comment.