Skip to content

Commit

Permalink
Removes annoying warning for users who have gulp installed globally b…
Browse files Browse the repository at this point in the history
…y other means (#32505)
  • Loading branch information
kristoferbaxter committed Feb 8, 2021
1 parent 57fdee9 commit 83d0066
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions build-system/common/check-package-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,20 @@ function runGulpChecks() {
);
updatesNeeded.add('gulp');
} else if (!globalGulpCli) {
console.log(
yellow('WARNING: Could not find a global install of'),
cyan('gulp-cli') + yellow('.')
);
console.log(
yellow('⤷ To fix this, run'),
cyan('"npm install --global gulp-cli"') + yellow('.')
);
updatesNeeded.add('gulp-cli');
const whichGulp = getStdout('which gulp').trim();
if (!whichGulp.match(/\/gulp/)) {
// User is missing a global gulp install on a terminal supporting `which`.
// Or they do not have it installed via NPM.
console.log(
yellow('WARNING: Could not find a global install of'),
cyan('gulp-cli') + yellow('.')
);
console.log(
yellow('⤷ To fix this, run'),
cyan('"npm install --global gulp-cli"') + yellow('.')
);
updatesNeeded.add('gulp-cli');
}
} else {
printGulpVersion('gulp-cli');
}
Expand Down

0 comments on commit 83d0066

Please sign in to comment.