mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
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:
parent
18e9d1eb11
commit
2337c91dce
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user