Skip to content

Commit

Permalink
Tolerate sails-hook-grunt specified in devDependencies when running s…
Browse files Browse the repository at this point in the history
…ails www
  • Loading branch information
mikermcneil committed Jan 25, 2018
1 parent 0b42c59 commit a2a0789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/sails-www.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ module.exports = function() {
throw flaverr('E_NO_SAILS_DEP', new Error('This package.json file does not declare `sails` as a dependency.\nAre you sure you\'re in the root directory of a Sails app?'));
}

var shGruntDepSVR = packageJson.dependencies['sails-hook-grunt'];
var shGruntDepSVR = packageJson.dependencies['sails-hook-grunt'] || packageJson.devDependencies['sails-hook-grunt'];
if (!shGruntDepSVR) {
throw flaverr('E_NO_SH_GRUNT_DEP', new Error('This app\'s package.json file does not declare `sails-hook-grunt` as a dependency.\nAre you sure this is a Sails v1.0 app that is using Grunt?'));
throw flaverr('E_NO_SH_GRUNT_DEP', new Error('This app\'s package.json file does not declare `sails-hook-grunt` in "dependencies" or "devDependencies".\nAre you sure this is a Sails v1.0 app that is using Grunt?'));
}

} catch (e) {
Expand Down

0 comments on commit a2a0789

Please sign in to comment.