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 22, 2019
1 parent ef58c59 commit 98159bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,15 @@ function handleArguments(env) {
ansi.red(missingGulpMessage),
ansi.magenta(tildify(env.cwd))
);
var hasYarn = fs.existsSync(path.join(env.cwd, 'yarn.lock'));
/* istanbul ignore next */
var installCommand =
missingNodeModules
? 'npm install'
? 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 98159bd

Please sign in to comment.