mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 00:24:15 +00:00
Make use of process.argv[0] instead of hardcoding "node" to windosu
This commit is contained in:
parent
6a83a537c7
commit
b2444feae9
@ -123,7 +123,7 @@
|
||||
if (os.platform() === 'win32' && (error != null) && (error.code === 'EPERM' || error.code === 'EACCES')) {
|
||||
windosu = require('windosu');
|
||||
resinWritePath = "\"" + (path.join(__dirname, '..', '..', 'bin', 'resin-write')) + "\"";
|
||||
return windosu.exec("node " + resinWritePath + " \"" + params.image + "\" \"" + params.device + "\"");
|
||||
return windosu.exec("\"" + process.argv[0] + "\" " + resinWritePath + " \"" + params.image + "\" \"" + params.device + "\"");
|
||||
} else {
|
||||
return done(error);
|
||||
}
|
||||
|
@ -157,6 +157,6 @@ exports.install =
|
||||
|
||||
# Need to escape every path to avoid errors
|
||||
resinWritePath = "\"#{path.join(__dirname, '..', '..', 'bin', 'resin-write')}\""
|
||||
windosu.exec("node #{resinWritePath} \"#{params.image}\" \"#{params.device}\"")
|
||||
windosu.exec("\"#{process.argv[0]}\" #{resinWritePath} \"#{params.image}\" \"#{params.device}\"")
|
||||
else
|
||||
return done(error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user