diff --git a/lib/src/child-writer/writer-proxy.js b/lib/src/child-writer/writer-proxy.js index cb2893ee..d22869eb 100644 --- a/lib/src/child-writer/writer-proxy.js +++ b/lib/src/child-writer/writer-proxy.js @@ -82,17 +82,18 @@ return isElevated().then((elevated) => { const elevator = Bluebird.promisifyAll(require('elevator')); return elevator.executeAsync([ - [ + 'set', + 'ELECTRON_RUN_AS_NODE=1', + '&&', + 'set', + `${CONSTANTS.TEMPORARY_LOG_FILE_ENVIRONMENT_VARIABLE}=${logFile}`, + '&&', - 'set ELECTRON_RUN_AS_NODE=1 &&', - `set ${CONSTANTS.TEMPORARY_LOG_FILE_ENVIRONMENT_VARIABLE}=${logFile} &&`, + // This is a trick to make the binary afterwards catch + // the environment variables set just previously. + 'call' - // This is a trick to make the binary afterwards catch - // the environment variables set just previously. - 'call' - - ].concat(process.argv).join(' ') - ], { + ].concat(process.argv), { hidden: true, terminating: true, doNotPushdCurrentDirectory: true,