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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-07-25 23:36:05 +0400
committerisaacs <i@izs.me>2010-07-25 23:36:05 +0400
commite86037de1fe2f5e34765719d4d9ac1afb921343b (patch)
treef41f449a9fbd3b77eb8e3406120352ecd9931d8f
parent0bd52f0b0bdcb96aacbb1ac2cd4cd1ef99c0eb4e (diff)
Fix tar usage so that it works on BSD
-rw-r--r--lib/cache.js2
-rwxr-xr-xscripts/install.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/cache.js b/lib/cache.js
index af6f3e8ee..9320ff907 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -207,7 +207,7 @@ function unpack (pkg, ver, unpackTarget, cb) {
function unpackTar (tarball, unpackTarget, cb) {
mkdir(unpackTarget, function (er) {
if (er) return log.er(cb, "Could not create "+unpackTarget)(er)
- exec("tar", ["xzf", tarball, "--strip", "1", "-C", unpackTarget], cb)
+ exec("tar", ["xzf", tarball, "--strip-components=1", "-C", unpackTarget], cb)
})
}
function packTar (targetTarball, folder, cb) {
diff --git a/scripts/install.sh b/scripts/install.sh
index f07517904..8430ea861 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -2,7 +2,7 @@
mkdir npm \
&& cd npm \
- && curl -L http://github.com/isaacs/npm/tarball/master | tar xz --strip 1 \
+ && curl -L http://github.com/isaacs/npm/tarball/master | tar xzf - --strip-components=1 \
&& make \
&& cd .. \
&& rm -rf npm \