提交 74aee4a1 编写于 作者: J Jess Chadwick

Tweaking the PowerShell path to execute the 64-bit version instead of 32-bit

Easter egg: this commit was done via the VSCode PS shell!
上级 a067422b
......@@ -17,7 +17,6 @@ export const TERMINAL_SERVICE_ID = 'terminalService';
export const TERMINAL_DEFAULT_SHELL_LINUX = !platform.isWindows ? (process.env.SHELL || 'sh') : 'sh';
export const TERMINAL_DEFAULT_SHELL_OSX = !platform.isWindows ? (process.env.SHELL || 'sh') : 'sh';
/** const TERMINAL_DEFAULT_SHELL_WINDOWS moved to ../electron-browser/terminal.ts */
export const TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE = platform.isWindows;
......
......@@ -8,7 +8,11 @@ import * as os from 'os';
import platform = require('vs/base/common/platform');
import processes = require('vs/base/node/processes');
const powershellPath = `${ process.env.SystemRoot }/system32/WindowsPowerShell/v1.0/powershell.exe`;
const powerShellExePath =
!process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432')
? `${process.env.windir}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`
: `${process.env.windir}\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe`;
const isAtLeastWindows10 = platform.isWindows && parseFloat(os.release()) >= 10;
export const TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powershellPath : processes.getWindowsShell();
export const TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powerShellExePath : processes.getWindowsShell();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册