Permalink
Browse files

Exit code now being passed

This was not happening before and would mean that failed executions of
`component build` would not set the status code on the shell.
  • Loading branch information...
1 parent ae27475 commit 0315a0dcc68ce1afb3d76e3497bc4292f340fdad @ravenac95 ravenac95 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 0315a0d

Please sign in to comment.