From 8dea1f5b5bde7b98c5a0e458f3878ac568217ddc Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Sat, 13 Oct 2018 17:00:42 -0700 Subject: [PATCH] Make sure flake8 exits with an error status if linting does not pass. --- gulpfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 2e4b4b1e..486f6233 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -86,7 +86,10 @@ gulp.task('watch', watch); function lint(cb) { var command = ['run', 'flake8', '--exclude=etc,migrations,manage.py,node_modules,settings']; command = command.concat(process.argv.splice(3)); - spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb); + spawn('pipenv', command, { stdio: 'inherit' }).on('exit', function (code) { + if (code) process.exit(code); + cb(); + }); pump([ gulp.src(config.watchConfig.stylesGlob),