提交 936c3361 编写于 作者: C Christof Marti 提交者: Ramya Rao

Removing env variables (#36242)

上级 8a67041e
......@@ -4855,7 +4855,7 @@ declare module 'vscode' {
/**
* Object with environment variables that will be added to the VS Code process.
*/
env?: { [key: string]: string };
env?: { [key: string]: string | null };
}
/**
......
......@@ -778,7 +778,12 @@ export class TerminalInstance implements ITerminalInstance {
const env = TerminalInstance._cloneEnv(parentEnv);
if (shell.env) {
Object.keys(shell.env).forEach((key) => {
env[key] = shell.env[key];
const value = shell.env[key];
if (typeof value === 'string') {
env[key] = value;
} else {
delete env[key];
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册