diff --git a/src/kit.ts b/src/kit.ts index dfea3cc01..bdd50f95e 100644 --- a/src/kit.ts +++ b/src/kit.ts @@ -975,13 +975,14 @@ export async function scanForKits(opt?: KitScanOptions) { // Rescan if the kits versions (extension context state var versus value defined for this release) don't match. export async function scanForKitsIfNeeded(context: vscode.ExtensionContext) : Promise { - const kitsVersionSaved = context.workspaceState.get('kitsVersionSaved'); + const kitsVersionSaved = context.globalState.get('kitsVersionSaved'); const kitsVersionCurrent = 1; // Scan also when there is no kits version saved in the state. - if (!kitsVersionSaved || kitsVersionSaved !== kitsVersionCurrent) { + if ((!kitsVersionSaved || kitsVersionSaved !== kitsVersionCurrent) && + process.env['CMT_TESTING'] !== '1') { await scanForKits(); - context.workspaceState.update('kitsVersionSaved', kitsVersionCurrent); + context.globalState.update('kitsVersionSaved', kitsVersionCurrent); } }