diff options
author | Domenic Denicola <domenic@domenicdenicola.com> | 2012-10-29 07:00:48 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-12-06 03:54:00 +0400 |
commit | 1a98de83c4ca0090114fa1251a1c94877087a557 (patch) | |
tree | 8ebb79d12b14f35624d7f881254c1f74aaf2cf4c | |
parent | 1310c816906ec851fb7b60be8f76285b790e2125 (diff) |
Stop trying to `spawn` non-exe's on Windows.
-rw-r--r-- | test/packages/npm-test-array-bin/test.js | 8 | ||||
-rw-r--r-- | test/packages/npm-test-dir-bin/test.js | 7 |
2 files changed, 6 insertions, 9 deletions
diff --git a/test/packages/npm-test-array-bin/test.js b/test/packages/npm-test-array-bin/test.js index b779e3a22..984bedb47 100644 --- a/test/packages/npm-test-array-bin/test.js +++ b/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) diff --git a/test/packages/npm-test-dir-bin/test.js b/test/packages/npm-test-dir-bin/test.js index e4ee83f9e..c59ec92da 100644 --- a/test/packages/npm-test-dir-bin/test.js +++ b/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) }) - |