提交 abfb016f 编写于 作者: A Andre Weinand

Revert "Support multi-line environment variables"

This reverts commit 4cd1c0fc.
上级 51209bba
...@@ -19,8 +19,7 @@ export function getUserEnvironment(): TPromise<IEnv> { ...@@ -19,8 +19,7 @@ export function getUserEnvironment(): TPromise<IEnv> {
} }
return new TPromise((c, e) => { return new TPromise((c, e) => {
// Use --null and split by '\0' as splitting by '\n' breaks multi-line environment variables let child = cp.spawn(process.env.SHELL, ['-ilc', 'env'], {
let child = cp.spawn(process.env.SHELL, ['-ilc', 'env', '--null'], {
detached: true, detached: true,
stdio: ['ignore', 'pipe', process.stderr], stdio: ['ignore', 'pipe', process.stderr],
}); });
...@@ -38,7 +37,7 @@ export function getUserEnvironment(): TPromise<IEnv> { ...@@ -38,7 +37,7 @@ export function getUserEnvironment(): TPromise<IEnv> {
let result: IEnv = Object.create(null); let result: IEnv = Object.create(null);
buffer.split('\0').forEach(line => { buffer.split('\n').forEach(line => {
let pos = line.indexOf('='); let pos = line.indexOf('=');
if (pos > 0) { if (pos > 0) {
let key = line.substring(0, pos); let key = line.substring(0, pos);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册