Skip to content

Commit a98b785

Browse files
committed
fix(gulp): don't warn about gulp hooks in v1 projects
1 parent 0c4f433 commit a98b785

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/cli.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ Cli.run = function run(processArgv) {
126126
var taskModule = Cli.lookupTask(taskSetting.module);
127127
var taskInstance = new taskModule();
128128

129-
var config;
130129
if (isIonicV2) {
131130
// probably a better way to do this, but to avoid changing run() for every
132131
// task for now
@@ -161,7 +160,7 @@ Cli.run = function run(processArgv) {
161160
return Q.fcall(taskInstance.run.bind(taskInstance), Cli, argv);
162161
},
163162
function(e){ //task error, let gulp handle it
164-
if (/serve|build|run|emulate|upload/.test(cmdName)) {
163+
if (/serve|build|run|emulate|upload/.test(cmdName) && argv.v2) {
165164
var taskName = (cmdName === 'serve') ? 'watch' : 'build';
166165
console.warn('WARN: No \'' + beforeHook + '\' gulp task found!');
167166
if (oldConfig && gulp.tasks[taskName]) {

0 commit comments

Comments
 (0)