Skip to content

Commit

Permalink
Fix "npm ls"-using tests on Windows.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
domenic authored and edef1c committed Jan 28, 2013
1 parent e9e1db1 commit 4638a79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/packages/npm-test-peer-deps-invalid/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
2 changes: 1 addition & 1 deletion test/packages/npm-test-peer-deps/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
2 changes: 1 addition & 1 deletion test/packages/npm-test-shrinkwrap/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4638a79

Please sign in to comment.