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-10-25 22:36:06 +0400
committerisaacs <i@izs.me>2010-10-25 22:36:06 +0400
commitd8e0550ddc3e6a4c5504bb104ac317f85d78769a (patch)
treefdf80c31e1b7d6989c44df407b4ac4b3d65108a4
parent4ca564fea69a74de4150787834a540b6ac8fcd15 (diff)
Put back the temp directory assurance kludge.
One day this will go away, I promise.
-rw-r--r--npm.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/npm.js b/npm.js
index ae887d17f..1989f8ebd 100644
--- a/npm.js
+++ b/npm.js
@@ -9,6 +9,7 @@ var npm = exports
, log = require("./lib/utils/log")
, fs = require("./lib/utils/graceful-fs")
, path = require("path")
+ , mkdir = require("./lib/utils/mkdir-p")
npm.commands = {}
npm.ELIFECYCLE = {}
@@ -77,7 +78,10 @@ npm.load = function (conf, cb) {
// don't assume that npm is installed in any particular spot, since this
// might conceivably be a bootstrap attempt.
log.waitForConfig()
- ini.resolveConfigs(conf, cb)
+ ini.resolveConfigs(conf, function (er) {
+ if (er) return cb(er)
+ mkdir(npm.tmp, cb)
+ })
}
// Local store for package data, so it won't have to be fetched/read more than