Skip to content

Commit

Permalink
Merge branch 'fix-path-on-windows'
Browse files Browse the repository at this point in the history
  • Loading branch information
sun-zheng-an committed Jun 3, 2015
2 parents 2c5dacb + 8f0eab6 commit 1f9a4de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ function shell(commands, options) {
}, options)

var pathToBin = path.join(process.cwd(), 'node_modules/.bin')
var PATH = pathToBin + path.delimiter + process.env.PATH
options.env = _.extend({}, process.env, {PATH: PATH}, options.env)
var pathName = /^win/.test(process.platform) ? 'Path' : 'PATH'
var newPath = pathToBin + path.delimiter + process.env[pathName]
options.env = _.extend(process.env, _.object([[pathName, newPath]]), options.env)

var stream = through.obj(function (file, unused, done) {
var self = this
Expand Down

0 comments on commit 1f9a4de

Please sign in to comment.