sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

add '/node_modules/.bin' to the path for executing local commands #101

Closed pflannery closed 8 years ago

pflannery commented 8 years ago

Was wondering if we could do this? would then be similar to npm run.

  process.env.path += [
    process.platform === 'win32' ? ';' : ':',
    path.join(process.cwd(),'node_modules/.bin')
  ].join('');
sindresorhus commented 8 years ago

Sure. Sounds like a good addition. Best to make it an option that is false by default as I don't want to do more breaking changes to this module. Option name preferLocal. Should use https://github.com/sindresorhus/npm-run-path. PR welcome :)