diff --git a/src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts b/src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts index bed2848ece92..5b69d6cb2238 100644 --- a/src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts +++ b/src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts @@ -61,9 +61,9 @@ function getDefaultShell(platform: IPlatformService, currentProcess: ICurrentPro } function getTerminalDefaultShellWindows(platform: IPlatformService, currentProcess: ICurrentProcess): string { const isAtLeastWindows10 = parseFloat(platform.osRelease) >= 10; - const is32ProcessOn64Windows = currentProcess.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'); + const isWoW64 = currentProcess.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'); const powerShellPath = `${currentProcess.env.windir}\\${ - is32ProcessOn64Windows ? 'Sysnative' : 'System32' + isWoW64 ? 'Sysnative' : 'System32' }\\WindowsPowerShell\\v1.0\\powershell.exe`; return isAtLeastWindows10 ? powerShellPath : getWindowsShell(currentProcess); } diff --git a/src/client/common/utils/runAfterActivation.ts b/src/client/common/utils/runAfterActivation.ts deleted file mode 100644 index 9a5297ea00f7..000000000000 --- a/src/client/common/utils/runAfterActivation.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const itemsToRun: (() => void)[] = []; -let activationCompleted = false; - -/** - * Add items to be run after extension activation. This will add item - * to the end of the list. This function will immediately run the item - * if extension is already activated. - */ -export function addItemsToRunAfterActivation(run: () => void): void { - if (activationCompleted) { - run(); - } else { - itemsToRun.push(run); - } -} - -/** - * This should be called after extension activation is complete. - */ -export function runAfterActivation(): void { - activationCompleted = true; - while (itemsToRun.length > 0) { - const run = itemsToRun.shift(); - if (run) { - run(); - } - } -} diff --git a/src/client/extension.ts b/src/client/extension.ts index b9f32187413b..2287aa265d2a 100644 --- a/src/client/extension.ts +++ b/src/client/extension.ts @@ -39,7 +39,6 @@ import { initializeStandard, initializeComponents, initializeGlobals } from './e import { IServiceContainer } from './ioc/types'; import { sendErrorTelemetry, sendStartupTelemetry } from './startupTelemetry'; import { IStartupDurations } from './types'; -import { runAfterActivation } from './common/utils/runAfterActivation'; import { IInterpreterService } from './interpreter/contracts'; import { PythonExtension } from './api/types'; import { WorkspaceService } from './common/application/workspace'; @@ -155,8 +154,6 @@ async function activateUnsafe( .catch((ex) => traceError('Python Extension: interpreterManager.refresh', ex)); } } - - runAfterActivation(); }); const api = buildApi(