Created
May 1, 2011 16:06
-
-
Save qbit/950607 to your computer and use it in GitHub Desktop.
openbsd npm install fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/utils/tar.js b/lib/utils/tar.js | |
index 8c5bf94..ffa4ac1 100644 | |
--- a/lib/utils/tar.js | |
+++ b/lib/utils/tar.js | |
@@ -167,11 +167,18 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) { | |
//console.error(npm.config.get("gzipbin")+" --decompress --stdout " | |
// +tarball+" | "+npm.config.get("tar")+" -mvxpf - --no-same-owner -C " | |
// +tmp) | |
+ var os = require("os"); | |
+ var opts = [ "-mvxpf", "-", "--no-same-owner", "-C", tmp]; | |
+ | |
+ if ( os.type() === 'OpenBSD' ) { | |
+ opts = [ "-mvxpf", "-", "-C", tmp]; | |
+ } | |
+ | |
pipe( spawn( npm.config.get("gzipbin") | |
, ["--decompress", "--stdout", tarball] | |
, process.env, false ) | |
, spawn( npm.config.get("tar") | |
- , ["-mvxpf", "-", "--no-same-owner", "-C", tmp] | |
+ , opts | |
, process.env, false ) | |
, function (er) { | |
// if we're not doing ownership management, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment