summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar/lib
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-05-01 01:27:33 -0700
committerForrest L Norvell <forrest@npmjs.com>2015-05-01 16:05:03 -0700
commit56e4255382ad4d2426e034624b41bbe97d18bca0 (patch)
treea4efb056d4a8b356cc232f31e00454834f0a6485 /deps/npm/node_modules/tar/lib
parentb4ad5d7050581fe615dab0ec8ef23c83bd965acb (diff)
downloadnode-new-56e4255382ad4d2426e034624b41bbe97d18bca0.tar.gz
deps: upgrade npm to 2.9.0
PR-URL: https://github.com/iojs/io.js/pull/1573 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/tar/lib')
-rw-r--r--deps/npm/node_modules/tar/lib/extract.js2
-rw-r--r--deps/npm/node_modules/tar/lib/pack.js7
-rw-r--r--deps/npm/node_modules/tar/lib/parse.js2
3 files changed, 8 insertions, 3 deletions
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index 5a4cb98c38..fe1bb976eb 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -88,7 +88,7 @@ inherits(Extract, tar.Parse)
Extract.prototype._streamEnd = function () {
var me = this
- if (!me._ended) me.error("unexpected eof")
+ if (!me._ended || me._entry) me.error("unexpected eof")
me._fst.end()
// my .end() is coming later.
}
diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js
index 3ff14dd695..5a3bb95a12 100644
--- a/deps/npm/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/tar/lib/pack.js
@@ -131,7 +131,12 @@ Pack.prototype._process = function () {
// in the tarball to use. That way we can skip a lot of extra
// work when resolving symlinks for bundled dependencies in npm.
- var root = path.dirname((entry.root || entry).path)
+ var root = path.dirname((entry.root || entry).path);
+ if (me._global && me._global.fromBase && entry.root && entry.root.path) {
+ // user set 'fromBase: true' indicating tar root should be directory itself
+ root = entry.root.path;
+ }
+
var wprops = {}
Object.keys(entry.props || {}).forEach(function (k) {
diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js
index 8517c481bc..1c53d9d26d 100644
--- a/deps/npm/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/tar/lib/parse.js
@@ -61,7 +61,7 @@ function Parse () {
// emitting "end"
Parse.prototype._streamEnd = function () {
var me = this
- if (!me._ended) me.error("unexpected eof")
+ if (!me._ended || me._entry) me.error("unexpected eof")
me.emit("end")
}