diff options
Diffstat (limited to 'deps/npm/lib/cache.js')
-rw-r--r-- | deps/npm/lib/cache.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 2d2148b1aa..3739968f6d 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -1107,9 +1107,7 @@ function addLocalDirectory (p, name, shasum, cb) { // tar it to the proper place, and add the cache tar if (p.indexOf(npm.cache) === 0) return cb(new Error( "Adding a cache directory to the cache will make the world implode.")) - var strict = p.indexOf(npm.tmp) !== 0 - && p.indexOf(npm.cache) !== 0 - readJson(path.join(p, "package.json"), strict, function (er, data) { + readJson(path.join(p, "package.json"), false, function (er, data) { er = needName(er, data) er = needVersion(er, data) if (er) return cb(er) @@ -1124,7 +1122,7 @@ function addLocalDirectory (p, name, shasum, cb) { getCacheStat(function (er, cs) { mkdir(path.dirname(tgz), function (er, made) { if (er) return cb(er) - tar.pack(tgz, p, data, strict, function (er) { + tar.pack(tgz, p, data, false, function (er) { if (er) { log.error( "addLocalDirectory", "Could not pack %j to %j" , p, tgz ) |