From 0d35d5613a7fe015ac2c47439544326acc1a7ddd Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Thu, 12 Jul 2012 12:07:23 -0700 Subject: [PATCH] Non-zero exit codes reject promise with a detailed message --- src/stdlib/child-process.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stdlib/child-process.coffee b/src/stdlib/child-process.coffee index e8885a7a2..c7b9a9174 100644 --- a/src/stdlib/child-process.coffee +++ b/src/stdlib/child-process.coffee @@ -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)