From 725eab9ed5d2889397bd4e7ba6fbc586e11a919d Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Fri, 14 Jul 2017 16:26:03 +1000 Subject: [PATCH] Use process.env after fixing it Previously, we were using process.env from when the module loaded. This caused it to miss out on the fixPath corrections. --- src/lib/actions/runCommand.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/actions/runCommand.js b/src/lib/actions/runCommand.js index 9918499..024218b 100644 --- a/src/lib/actions/runCommand.js +++ b/src/lib/actions/runCommand.js @@ -3,7 +3,6 @@ import { spawn } from 'child_process'; window.running = {}; const vagrantEnv = { - ...process.env, CLICOLOR_FORCE: 'yes', GIT_COLOR: 'yes', @@ -19,7 +18,10 @@ export default function runCommand(path, command, args = [], opts = {}) { let spawnOpts = Object.assign({}, { cwd: path, - env: vagrantEnv, + env: { + ...process.env, + ...vagrantEnv, + }, }, opts); const proc = spawn( command, args, spawnOpts );