diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-09-26 09:02:14 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-09-26 12:59:57 +0400 |
commit | 11a78536445fdcafccdb128d725f49727142f637 (patch) | |
tree | c229a0e3b032d50b69888279a19cc13be620168e /lib/cache/add-local-tarball.js | |
parent | f24b552b596d0627549cdd7c2d68fcf9006ea50a (diff) |
code style tweaks
Diffstat (limited to 'lib/cache/add-local-tarball.js')
-rw-r--r-- | lib/cache/add-local-tarball.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/cache/add-local-tarball.js b/lib/cache/add-local-tarball.js index d10bd3dd7..8bf676cc9 100644 --- a/lib/cache/add-local-tarball.js +++ b/lib/cache/add-local-tarball.js @@ -3,7 +3,6 @@ var mkdir = require("mkdirp") , fs = require("graceful-fs") , writeFileAtomic = require("write-file-atomic") , readJson = require("read-package-json") - , log = require("npmlog") , path = require("path") , sha = require("sha") , npm = require("../npm.js") @@ -13,7 +12,7 @@ var mkdir = require("mkdirp") , chownr = require("chownr") , inflight = require("inflight") , once = require("once") - , writeStream = require('fs-write-stream-atomic') + , writeStream = require("fs-write-stream-atomic") module.exports = addLocalTarball @@ -61,7 +60,7 @@ function addLocalTarball (p, pkgData, shasum, cb_) { , errState = null function errHandler (er) { if (errState) return - return cb(errState = er) + cb(errState = er) } from.on("error", errHandler) to.on("error", errHandler) @@ -117,7 +116,7 @@ function addTmpTarball (tgz, pkgData, shasum, cb) { // we already have the package info, so just move into place if (pkgData && pkgData.name && pkgData.version) { - return addTmpTarball_(tgz, pkgData, shasum, cb) + addTmpTarball_(tgz, pkgData, shasum, cb) } // This is a tarball we probably downloaded from the internet. @@ -179,7 +178,7 @@ function addTmpTarball_ (tgz, data, shasum, cb) { // chown starting from the first dir created by mkdirp, // or the root dir, if none had to be created, so that // we know that we get all the children. - function chown (er) { + function chown () { chownr(created || root, cs.uid, cs.gid, done) } |