| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f8feb02 commit d27e463
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,23 +26,21 @@ const os = require('os'); | |||
| 26 | 26 | ||
| 27 | 27 | const spawn = require('child_process').spawn; | |
| 28 | 28 | ||
| 29 | - const env = { | ||
| 29 | + const env = Object.assign({}, process.env, { | ||
| 30 | 30 | 'HELLO': 'WORLD', | |
| 31 | 31 | 'UNDEFINED': undefined, | |
| 32 | 32 | 'NULL': null, | |
| 33 | 33 | 'EMPTY': '' | |
| 34 | - }; | ||
| 34 | + }); | ||
| 35 | 35 | Object.setPrototypeOf(env, { | |
| 36 | 36 | 'FOO': 'BAR' | |
| 37 | 37 | }); | |
| 38 | 38 | ||
| 39 | 39 | let child; | |
| 40 | 40 | if (common.isWindows) { | |
| 41 | - child = spawn('cmd.exe', ['/c', 'set'], | ||
| 42 | - Object.assign({}, process.env, { env })); | ||
| 41 | + child = spawn('cmd.exe', ['/c', 'set'], { env }); | ||
| 43 | 42 | } else { | |
| 44 | - child = spawn('/usr/bin/env', [], | ||
| 45 | - Object.assign({}, process.env, { env })); | ||
| 43 | + child = spawn('/usr/bin/env', [], { env }); | ||
| 46 | 44 | } | |
| 47 | 45 | ||
| 48 | 46 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments