Skip to content

Commit

Permalink
fix(gulp): don't warn about gulp hooks in v1 projects
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 28, 2016
1 parent 0c4f433 commit a98b785
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ Cli.run = function run(processArgv) {
var taskModule = Cli.lookupTask(taskSetting.module);
var taskInstance = new taskModule();

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

0 comments on commit a98b785

Please sign in to comment.