Skip to content
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 exits zero if a promise is rejected with no value #1327

Closed
ariporad opened this issue Oct 14, 2015 · 4 comments
Closed

Gulp exits zero if a promise is rejected with no value #1327

ariporad opened this issue Oct 14, 2015 · 4 comments

Comments

@ariporad
Copy link

Hi,

First, versions:

$ gulp -v
[21:05:26] CLI version 0.3.0
[21:05:26] Local version 3.9.0

After a bit of debugging, I've discovered that this code causes gulp to exit 1 (as it should):

var gulp = require('gulp');

gulp.task('myTask', function () {
    return Promise.reject('Everything\'s Broken!');
});

Where as this causes it to exit 0, when it should exit 1:

var gulp = require('gulp');

gulp.task('myTask', function () {
    return Promise.reject(); // No rejection value
});

I hope I'm not submitting a duplicate, I couldn't find one. Thanks!

@phated
Copy link
Member

phated commented Oct 14, 2015

Can you test this with gulp 4.0 and see if it still happens?

@ariporad
Copy link
Author

@phated: nope, it's fixed: I just spent waaaaay too much time proving it.

Is there documentation on gulp 4, and how to upgrade to it?

@phated
Copy link
Member

phated commented Oct 19, 2015

@ariporad all the documentation in the 4.0 branch should be updated. We don't have a migration guide yet, as we are looking to the community to help out with that. See: #861

I don't think we will be able to backport that change into the 3.x branch. Sorry.

@phated phated closed this as completed Oct 19, 2015
@roymiloh
Copy link

roymiloh commented Jun 17, 2016

I spent wayyyy too much time before accidentally "solving" it (passing an arbitrary string to reject method), then came here to see if anybody else encountered this bug, and found this issue - @phated, it could be really helpful documenting it somewhere (as you said, it won't work in 3.x, ever).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants