diff options
author | isaacs <i@izs.me> | 2010-10-25 22:36:06 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-10-25 22:36:06 +0400 |
commit | d8e0550ddc3e6a4c5504bb104ac317f85d78769a (patch) | |
tree | fdf80c31e1b7d6989c44df407b4ac4b3d65108a4 | |
parent | 4ca564fea69a74de4150787834a540b6ac8fcd15 (diff) |
Put back the temp directory assurance kludge.
One day this will go away, I promise.
-rw-r--r-- | npm.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |