Skip to content

Commit

Permalink
If yarn.lock exists, adjust "install gulp" message
Browse files Browse the repository at this point in the history
  • Loading branch information
bdukes committed Apr 6, 2018
1 parent 6f5447b commit 73e7d6d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,15 @@ function handleArguments(env) {
ansi.red(missingGulpMessage),
ansi.magenta(tildify(env.cwd))
);
var hasYarn = fs.existsSync(path.join(env.cwd, 'yarn.lock'));
var installCommand =
missingNodeModules
? 'npm install'
: 'npm install gulp';
? hasYarn
? 'yarn install'
: 'npm install'
: hasYarn
? 'yarn add gulp'
: 'npm install gulp';
log.error(ansi.red('Try running: ' + installCommand));
exit(1);
}
Expand Down

0 comments on commit 73e7d6d

Please sign in to comment.