Skip to content

Commit 1fa7c4d

Browse files
committed
Don't show 'using global install' warning for --help
Fixes #284
1 parent 6d79282 commit 1fa7c4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/gatsby.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ var loadGatsby = function (path) {
3131
}
3232

3333
var loadGlobalGatsby = function () {
34-
if (process.argv[2] !== "new") {
34+
var commandsToIgnore = ['new', '--help']
35+
if (commandsToIgnore.indexOf(process.argv[2]) === -1) {
3536
console.log(
3637
"A local install of Gatsby was not found.\n" +
3738
"Generally you should save Gatsby as a site dependency e.g. npm install --save gatsby\n" +

0 commit comments

Comments
 (0)