From 9dcb96b5748ef1a538dbadfcb2738bbc00b7825e Mon Sep 17 00:00:00 2001 From: Denis Golovin Date: Tue, 14 May 2024 19:45:47 -0700 Subject: [PATCH] fix: delay crc-detection and init till after activation Signed-off-by: Denis Golovin --- src/extension.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 17bcc72e..90e5603a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -49,7 +49,7 @@ let connectionFactoryDisposable: extensionApi.Disposable; let crcVersion: CrcVersion | undefined; -export async function activate(extensionContext: extensionApi.ExtensionContext): Promise { +async function _activate(extensionContext: extensionApi.ExtensionContext): Promise { const crcInstaller = new CrcInstall(extensionContext.storagePath); crcVersion = await getCrcVersion(); @@ -190,6 +190,10 @@ export async function activate(extensionContext: extensionApi.ExtensionContext): ); } +export async function activate(extensionContext: extensionApi.ExtensionContext): Promise { + _activate(extensionContext).catch(console.error); +} + async function registerCrcUpdate( crcVersion: CrcVersion, crcInstaller: CrcInstall,