Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDomenic Denicola <domenic@domenicdenicola.com>2013-01-28 13:09:37 +0400
committerNathan Zadoks <nathan@nathan7.eu>2013-01-28 13:51:01 +0400
commit4638a792fda9a322c4084a46728ebcc9cdab0036 (patch)
tree576da3b3632c3d4186a289885d1950d04bef91d2 /test
parente9e1db1cafcc7e311ddbd8137ae3b74857768469 (diff)
Fix "npm ls"-using tests on Windows.
exec doesn't work well when there are spaces in the path, like in the default installs of Node.js on Windows into Program Files.
Diffstat (limited to 'test')
-rw-r--r--test/packages/npm-test-peer-deps-invalid/test.js2
-rw-r--r--test/packages/npm-test-peer-deps/test.js2
-rw-r--r--test/packages/npm-test-shrinkwrap/test.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/packages/npm-test-peer-deps-invalid/test.js b/test/packages/npm-test-peer-deps-invalid/test.js
index 70462641f..fd0a96bac 100644
--- a/test/packages/npm-test-peer-deps-invalid/test.js
+++ b/test/packages/npm-test-peer-deps-invalid/test.js
@@ -7,7 +7,7 @@ delete process.env.npm_config_depth
var npm = process.env.npm_execpath
-require("child_process").exec(npm + " ls --json", {
+require("child_process").execFile(process.execPath, [npm, "ls", "--json"], {
env: process.env, cwd: process.cwd() },
function (err, stdout, stderr) {
diff --git a/test/packages/npm-test-peer-deps/test.js b/test/packages/npm-test-peer-deps/test.js
index 98dbf5f5a..c63f0a54c 100644
--- a/test/packages/npm-test-peer-deps/test.js
+++ b/test/packages/npm-test-peer-deps/test.js
@@ -7,7 +7,7 @@ delete process.env.npm_config_depth
var npm = process.env.npm_execpath
-require("child_process").exec(npm + " ls --json", {
+require("child_process").execFile(process.execPath, [npm, "ls", "--json"], {
env: process.env, cwd: process.cwd() },
function (err, stdout, stderr) {
diff --git a/test/packages/npm-test-shrinkwrap/test.js b/test/packages/npm-test-shrinkwrap/test.js
index f3fe8a4e8..fba90ec65 100644
--- a/test/packages/npm-test-shrinkwrap/test.js
+++ b/test/packages/npm-test-shrinkwrap/test.js
@@ -7,7 +7,7 @@ delete process.env.npm_config_depth
var npm = process.env.npm_execpath
-require("child_process").exec(npm + " ls --json", {
+require("child_process").execFile(process.execPath, [npm, "ls", "--json"], {
stdio: "pipe", env: process.env, cwd: process.cwd() },
function (err, stdout, stderr) {
if (err) throw err