Open jonstorer opened 10 years ago
I can't reproduce this with a minimal example. I have a Jakefile like this:
task('success', function () {
console.log('w00t');
});
task('failure', function () {
fail(new Error(), 42);
});
Here's the output I get from running the two tasks:
lerxst:work mde$ ./jake/bin/cli.js success && echo howdy
w00t
howdy
lerxst:work mde$ echo $?
0
lerxst:work mde$ ./jake/bin/cli.js failure && echo howdy
jake aborted.
Error
at null.action (/Users/mde/work/Jakefile:7:8)
at TaskBase.run (/Users/mde/work/jake/lib/task/task.js:199:27)
(See full trace by running task with --trace)
lerxst:work mde$ echo $?
42
I've setup a task called
poke:staging
. After I've deployed to staging, I'd like to check that it's up before I automatically push to production. Howeverfail(err, 1)
does not halt a command chain.Example:
if staging is down & I fail the
poke:staging
task, thengit push $COMMIT:production
should not run. It does.Am I missing something?