Skip to content

Commit

Permalink
Revert "Support multi-line environment variables"
Browse files Browse the repository at this point in the history
This reverts commit 4cd1c0f.
  • Loading branch information
weinand committed Mar 25, 2016
1 parent 51209bb commit abfb016
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/vs/base/node/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export function getUserEnvironment(): TPromise<IEnv> {
}

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', '--null'], {
let child = cp.spawn(process.env.SHELL, ['-ilc', 'env'], {
detached: true,
stdio: ['ignore', 'pipe', process.stderr],
});
Expand All @@ -38,7 +37,7 @@ export function getUserEnvironment(): TPromise<IEnv> {

let result: IEnv = Object.create(null);

buffer.split('\0').forEach(line => {
buffer.split('\n').forEach(line => {
let pos = line.indexOf('=');
if (pos > 0) {
let key = line.substring(0, pos);
Expand Down

0 comments on commit abfb016

Please sign in to comment.