-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulp 4 returns with exit code 0 even if there are unfinished tasks #2081
Comments
For the record, I tested with the latest version, and got the same result: $ gulp -v
[16:56:02] CLI version 2.0.0
[16:56:02] Local version 4.0.0
$ gulp aaa
[16:59:25] Using gulpfile .../gulpfile.js
[16:59:25] Starting 'aaa'...
[16:59:25] The following tasks did not complete: aaa
[16:59:25] Did you forget to signal async completion?
$ echo $?
0 |
@barbogast I like this idea (and I think I might have tried to do it before) but the way node handles /cc @sttk in case he knows something more than me. |
@phated Since node v0.11, exit code can be specified by setting to In v0.10, exit code can be specified by using Should we do this? |
@sttk maybe we should only support this with |
@phated I got it. I'll send a pr about this after I research exit code when gulp-cli is respawned. |
I just tried setting process.exitCode and it seemed to work for me. See the PR above. |
What were you expecting to happen?
Gulp 4 returns a non-zero exit code if tasks are unfinished
What actually happened?
Gulp 4 returned exit code zero
Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)
When running the task gulp correctly reports that the task has not completed. But the return code of gulp seems to be
0
. I would prefer it to be1
.What version of gulp are you using?
What versions of npm and node are you using?
The text was updated successfully, but these errors were encountered: