Permalink
Browse files

Merge pull request #298 from ravenac95/exit-code-fix

Exit code now being passed
  • Loading branch information...
2 parents f6e4557 + 0315a0d commit 07c1a70f7f3c7ea1d186dd7e89381c3518e8e8ea TJ Holowaychuk committed Mar 26, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 bin/component
View
@@ -72,4 +72,8 @@ if (exists(local)) bin = local;
// spawn
-var proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
+var proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
+// Pass the exit code upon 'close' of the child process
+proc.on('close', function(code) {
+ process.exit(code);
+});

0 comments on commit 07c1a70

Please sign in to comment.