Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] windows support #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
!/test/**/node_modules
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
before_install: npm install npm -g
node_js:
- 4
- 6
- 8
- 10
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ var npmPath = require('npm-path')
var childProcess = require('child_process')

var exec = childProcess.exec
var spawn = childProcess.spawn
var spawnSync = childProcess.spawnSync
var spawn = require('cross-spawn')
var spawnSync = spawn.sync

// polyfill for childProcess.execSync
var execSync = childProcess.execSync
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"tape": "^4.9.0"
},
"dependencies": {
"cross-spawn": "^6.0.5",
"minimist": "^1.2.0",
"npm-path": "^2.0.4",
"npm-which": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion test/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var bl = require('bl')
var fs = require('fs')

var path = require('path')
var spawn = require('child_process').spawn
var spawn = require('cross-spawn')

var level0 = path.join(__dirname, 'fixtures', 'level0')
var level1 = path.join(level0, 'node_modules', 'level1')
Expand Down
2 changes: 1 addition & 1 deletion test/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test('options are optional', function (t) {

npmRun(badPath, function (err, stdout, stderr) {
t.ok(err, 'has error')
t.equal(err.code, 127)
t.equal(err.code, (process.platform === 'win32' ? 1 : 127))
t.end()
})
})
Expand Down
19 changes: 15 additions & 4 deletions test/fixtures/level0/node_modules/.bin/level1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions test/fixtures/level0/node_modules/.bin/level1.CMD

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions test/fixtures/level0/node_modules/level1/level1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions test/fixtures/level0/node_modules/level1/node_modules/.bin/level2

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.