Skip to content

Commit

Permalink
fix(hooks): don't require Gulpfile twice
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 28, 2016
1 parent a48e7b9 commit c17d268
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,10 @@ Cli.run = function run(processArgv) {

function loadGulp(){
var names = ['gulpfile.js', 'Gulpfile.js'];
var found = false;
for (var i = 0, ii = names.length; i < ii; i++) {
try {
require(path.resolve(process.cwd() + '/' + names[i]));
found = true;
return true;
} catch(e){
if (e instanceof SyntaxError) {
console.error('\nThere is a syntax error in your gulpfile:');
Expand All @@ -213,7 +212,7 @@ function loadGulp(){
}
}
}
return found;
return false;
}

function logEvents(gulpInst) {
Expand Down

0 comments on commit c17d268

Please sign in to comment.