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:
Diffstat (limited to 'lib/root.js')
-rw-r--r--lib/root.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/root.js b/lib/root.js
index 9310bda92..958361d35 100644
--- a/lib/root.js
+++ b/lib/root.js
@@ -1,11 +1,14 @@
module.exports = root
-var npm = require("./npm.js")
+var npm = require('./npm.js')
-root.usage = "npm root [-g]"
+root.usage = 'npm root [-g]'
function root (args, silent, cb) {
- if (typeof cb !== "function") cb = silent, silent = false
+ if (typeof cb !== 'function') {
+ cb = silent
+ silent = false
+ }
if (!silent) console.log(npm.dir)
process.nextTick(cb.bind(this, null, npm.dir))
}