Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stop trying to `spawn` non-exe's on Windows.

  • Loading branch information...
commit 1a98de83c4ca0090114fa1251a1c94877087a557 1 parent 1310c81
@domenic domenic authored isaacs committed
View
8 test/packages/npm-test-array-bin/test.js
@@ -1,6 +1,4 @@
-var c = require('child_process').spawn('array-bin', [], {
- env: process.env }).on('close', function (code) {
- if (code) throw new Error('exited badly with code = ' + code)
+require('child_process').exec('array-bin', { env: process.env },
+ function (err) {
+ if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})
-c.stdout.pipe(process.stdout)
-c.stderr.pipe(process.stderr)
View
7 test/packages/npm-test-dir-bin/test.js
@@ -1,5 +1,4 @@
-require('child_process').spawn('dir-bin', [], {
- env: process.env }).on('exit', function (code) {
- if (code) throw new Error('exited badly with code = ' + code)
+require('child_process').exec('dir-bin', { stdio: 'pipe',
+ env: process.env }, function (err) {
+ if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})
-
Please sign in to comment.
Something went wrong with that request. Please try again.