mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Non-zero exit codes reject promise with a detailed message
This commit is contained in:
@@ -15,9 +15,7 @@ class ChildProccess
|
||||
|
||||
$native.exec command, options, (exitStatus, stdout, stderr) ->
|
||||
if exitStatus != 0
|
||||
error = new Error("Exec failed (#{exitStatus}) command '#{command}'")
|
||||
error.exitStatus = exitStatus
|
||||
deferred.reject(error)
|
||||
deferred.reject("Command '#{command}' failed with exit status #{exitStatus} and stderr '#{stderr}'")
|
||||
else
|
||||
deferred.resolve(stdout, stderr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user