Skip to content

Commit 0ce5642

Browse files
committed
fix(hooks): only warn about missing tasks if they are missing
1 parent 33af80c commit 0ce5642

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/cli.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ function runWithGulp(argv, taskInstance){
150150
return Q.fcall(taskInstance.run.bind(taskInstance), Cli, argv);
151151
},
152152
function(e){ //task error, let gulp handle it
153-
154-
// Warn if it's a v2 project and there isn't a build hook
155-
if (/serve|build|run|emulate|upload/.test(cmdName) && argv.v2) {
153+
if (e.missingTask && /serve|build|run|emulate|upload/.test(cmdName) && argv.v2) {
156154
var taskName = (cmdName === 'serve') ? 'watch' : 'build';
157155
console.warn('WARN: No \'' + beforeHook + '\' gulp task found!');
158156

0 commit comments

Comments
 (0)