本文整理汇总了TypeScript中vs/base/node/processes.getWindowsShell函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getWindowsShell函数的具体用法?TypeScript getWindowsShell怎么用?TypeScript getWindowsShell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getWindowsShell函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: getTerminalDefaultShellWindows
export function getTerminalDefaultShellWindows(): string {
if (!_TERMINAL_DEFAULT_SHELL_WINDOWS) {
const isAtLeastWindows10 = platform.isWindows && parseFloat(os.release()) >= 10;
const is32ProcessOn64Windows = process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432');
const powerShellPath = `${process.env.windir}\\${is32ProcessOn64Windows ? 'Sysnative' : 'System32'}\\WindowsPowerShell\\v1.0\\powershell.exe`;
_TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powerShellPath : processes.getWindowsShell();
}
return _TERMINAL_DEFAULT_SHELL_WINDOWS;
}
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:9,代码来源:terminal.ts
示例2: getDefaultShell
export function getDefaultShell(p: platform.Platform): string {
if (p === platform.Platform.Windows) {
if (platform.isWindows) {
return getTerminalDefaultShellWindows();
}
// Don't detect Windows shell when not on Windows
return processes.getWindowsShell();
}
// Only use $SHELL for the current OS
if (platform.isLinux && p === platform.Platform.Mac || platform.isMacintosh && p === platform.Platform.Linux) {
return '/bin/bash';
}
return getTerminalDefaultShellUnixLike();
}
开发者ID:DonJayamanne,项目名称:vscode,代码行数:14,代码来源:terminal.ts
示例3: parseFloat
/*---------------------------------------------------------------------------------------------
* 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 cp from 'child_process';
import * as os from 'os';
import * as platform from 'vs/base/common/platform';
import * as processes from 'vs/base/node/processes';
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 isAtLeastWindows10 = platform.isWindows && parseFloat(os.release()) >= 10;
const is64BitWindows = process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432');
const powerShellPath = `${process.env.windir}\\${is64BitWindows ? 'Sysnative' : 'System32'}\\WindowsPowerShell\\v1.0\\powershell.exe`;
export const TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powerShellPath : processes.getWindowsShell();
export interface ITerminalProcessFactory {
create(env: { [key: string]: string }): cp.ChildProcess;
}
开发者ID:FabianLauer,项目名称:vscode,代码行数:23,代码来源:terminal.ts
注:本文中的vs/base/node/processes.getWindowsShell函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论