Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
fix(install): get windows workin (#27)
Browse files Browse the repository at this point in the history
Fixes: #14
Credit: @katemihalikova
  • Loading branch information
katemihalikova authored and zkat committed Jun 4, 2017
1 parent f6bdfa1 commit 9472175
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions child.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function escapeArg (str, asPath) {
? path.normalize(str)
.split(/\\/)
.map(s => s.match(/\s+/) ? `"${s}"` : s)
.join('\\')
: process.platform === 'win32'
? `"${path.normalize(str)}"`
: str.match(/[^-_.~/\w]/)
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function getCmdPath (command, specs, npmOpts) {
return rimraf(prefix).then(() => {
return installPackages(specs, prefix, npmOpts).then(() => {
process.env.PATH = `${
path.join(prefix, 'bin')
process.platform === 'win32' ? prefix : path.join(prefix, 'bin')
}${PATH_SEP}${process.env.PATH}`
return which(command)
})
Expand Down

0 comments on commit 9472175

Please sign in to comment.