mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-21 11:35:54 +00:00
Fix logical issue in update command
This commit is contained in:
parent
ae8c941bfe
commit
37d96e238d
@ -36,7 +36,7 @@
|
||||
};
|
||||
command = "npm install --global " + packageJSON.name;
|
||||
return child_process.exec(command, function(error, stdout, stderr) {
|
||||
if (error != null) {
|
||||
if (error == null) {
|
||||
return onUpdate(null, stdout, stderr);
|
||||
}
|
||||
if (_.any([error.code === 3, error.code === 'EPERM', error.code === 'ACCES'])) {
|
||||
|
@ -41,7 +41,7 @@ exports.update =
|
||||
# A safer thing to do is to call npm as a child process
|
||||
# https://github.com/npm/npm/issues/7723
|
||||
child_process.exec command, (error, stdout, stderr) ->
|
||||
return onUpdate(null, stdout, stderr) if error?
|
||||
return onUpdate(null, stdout, stderr) if not error?
|
||||
|
||||
if _.any [
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user