-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18493 from jchadwick/jchadwick/default-powershell…
…-terminal Setting Powershell as default terminal for Windows 10+ (fixes #16838)
- Loading branch information
Showing
4 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/vs/workbench/parts/terminal/electron-browser/terminal.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
'use strict'; | ||
|
||
import * as os from 'os'; | ||
import platform = require('vs/base/common/platform'); | ||
import processes = require('vs/base/node/processes'); | ||
|
||
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 ? powerShellExePath : processes.getWindowsShell(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters