Permalink
Browse files

Fix tests on unix

  • Loading branch information...
1 parent 390cc40 commit 903419023857ea8944bfd5707256f18983e294cd @isaacs isaacs committed Dec 12, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 test/packages/npm-test-shrinkwrap/test.js
  2. +1 −1 test/run.js
View
4 test/packages/npm-test-shrinkwrap/test.js
@@ -5,7 +5,9 @@ process.env.npm_config_prefix = process.cwd()
delete process.env.npm_config_global
delete process.env.npm_config_depth
-var npm = path.resolve(process.env.npm_config_prefix, "../../npm")
+var npm = process.platform === "win32"
+ ? path.resolve(process.env.npm_config_prefix, "../../npm")
+ : path.resolve(process.env.npm_config_prefix, "../../../bin/npm")
require("child_process").exec(npm + " ls --json", {
stdio: "pipe", env: process.env, cwd: process.cwd() },
View
2 test/run.js
@@ -144,7 +144,7 @@ function main (cb) {
installAllThenTestAll()
function installAllThenTestAll () {
- var packagesToRm = packages
+ var packagesToRm = packages.slice(0)
if (process.platform !== "win32") {
// Windows can't handle npm rm npm due to file-in-use issues.
packagesToRm.push("npm")

0 comments on commit 9034190

Please sign in to comment.