refactor(GUI): log elevation command in Windows (#784)

We do this for macOS and GNU/Linux for debugging purposes, but we
weren't doing it for Windows.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2016-10-29 00:03:34 -04:00 committed by GitHub
parent 18e9d1eb11
commit 2337c91dce

View File

@ -47,7 +47,7 @@ return isElevated().then((elevated) => {
if (os.platform() === 'win32') { if (os.platform() === 'win32') {
const elevator = Bluebird.promisifyAll(require('elevator')); const elevator = Bluebird.promisifyAll(require('elevator'));
return elevator.executeAsync([ const commandArguments = [
'set', 'set',
'ELECTRON_RUN_AS_NODE=1', 'ELECTRON_RUN_AS_NODE=1',
'&&', '&&',
@ -62,7 +62,12 @@ return isElevated().then((elevated) => {
// the environment variables set just previously. // the environment variables set just previously.
'call' 'call'
].concat(process.argv), { ].concat(process.argv);
// For debugging purposes
console.log(`Running: ${commandArguments.join(' ')}`);
return elevator.executeAsync(commandArguments, {
hidden: true, hidden: true,
terminating: true, terminating: true,
doNotPushdCurrentDirectory: true, doNotPushdCurrentDirectory: true,