Skip to content

Commit

Permalink
Merge pull request #9 from wenzi0github/master
Browse files Browse the repository at this point in the history
compatible windows
  • Loading branch information
dflourusso authored Feb 6, 2018
2 parents ec4e2e5 + 4af77da commit c5ebb7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ Hook.prototype.run = function runner() {
// this doesn't have the required `isAtty` information that libraries use to
// output colors resulting in script output that doesn't have any color.
//
spawn(hooked.npm, ['run', script, '--silent'], {

let cmd = process.platform=='win32' ? 'npm.cmd' : 'npm';
spawn(cmd, ['run', script, '--silent'], {
env: process.env,
cwd: hooked.root,
stdio: [0, 1, 2]
Expand Down

0 comments on commit c5ebb7a

Please sign in to comment.