diff options
author | isaacs <i@izs.me> | 2011-01-12 05:05:29 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-01-12 05:05:29 +0300 |
commit | 27b9f7b4d79a76e1d490cd4e5fef3a187d5f62a1 (patch) | |
tree | 3956c9d981f4924cdc0c5e24dabdefff384e8509 /npm.js | |
parent | 916e1baa7d05253fbe305b4a04962fa67d486033 (diff) |
Fix #499. Only mkdir when appropriate.
This is a pretty significant clean-up of many relics.
Once upon a time, npm was only one or two commands, and when you needed
a directory made, by golly, you made it yourself. If you needed to
write a file, you wrote it yourself. Uphill in the snow. Yeah.
Then, modernity arrived, and things got abstracted. Now, instead of
writing your own file, the kids today with their rock and roll music and
their hair and their marijuana cigarettes, you know what they do? They
call some external utility to write it FOR them!
That means that there's no need to make any directories at config
loading time. Since many commands don't need it, this is a nuisance.
Also, it's more clutter, and interferes with the planned permissions
handling schemes.
Diffstat (limited to 'npm.js')
-rw-r--r-- | npm.js | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -18,7 +18,6 @@ var EventEmitter = require("events").EventEmitter , log = require("./lib/utils/log") , fs = require("./lib/utils/graceful-fs") , path = require("path") - , mkdir = require("./lib/utils/mkdir-p") , abbrev = require("./lib/utils/abbrev") , which = require("./lib/utils/which") @@ -138,10 +137,7 @@ npm.load = function (conf, cb_) { log.verbose("node symlink", node) process.execPath = node } - ini.resolveConfigs(conf, function (er) { - if (er) return cb(er) - mkdir(npm.tmp, cb) - }) + ini.resolveConfigs(conf, cb) }) } |