未验证 提交 dbe1ae75 编写于 作者: D Daniel Imms 提交者: GitHub

Merge pull request #76807 from microsoft/tyriar/shell_stable

Make vscode.env.shell stable API
......@@ -14,6 +14,7 @@ suite('env-namespace', () => {
assert.equal(typeof env.appName, 'string');
assert.equal(typeof env.machineId, 'string');
assert.equal(typeof env.sessionId, 'string');
assert.equal(typeof env.shell, 'string');
});
test('env is readonly', function () {
......@@ -22,6 +23,7 @@ suite('env-namespace', () => {
assert.throws(() => (env as any).appName = '234');
assert.throws(() => (env as any).machineId = '234');
assert.throws(() => (env as any).sessionId = '234');
assert.throws(() => (env as any).shell = '234');
});
test('env.remoteName', function () {
......
......@@ -6079,6 +6079,12 @@ declare module 'vscode' {
*/
export const remoteName: string | undefined;
/**
* The detected default shell for the extension host, this is overridden by the
* `terminal.integrated.shell` setting for the extension host's platform.
*/
export const shell: string;
/**
* Opens an *external* item, e.g. a http(s) or mailto-link, using the
* default application.
......
......@@ -623,12 +623,6 @@ declare module 'vscode' {
*/
export const logLevel: LogLevel;
/**
* The detected default shell for the extension host, this is overridden by the
* `terminal.integrated.shell` setting for the extension host's platform.
*/
export const shell: string;
/**
* An [event](#Event) that fires when the log level has changed.
*/
......
......@@ -258,7 +258,6 @@ export function createApiFactory(
return extHostClipboard;
},
get shell() {
checkProposedApiEnabled(extension);
return extHostTerminalService.getDefaultShell(configProvider);
},
openExternal(uri: URI) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册