Skip to content

Instantly share code, notes, and snippets.

@thefourtheye
Created April 21, 2015 09:38
Show Gist options
  • Save thefourtheye/d29bba5cf247272a05c9 to your computer and use it in GitHub Desktop.
Save thefourtheye/d29bba5cf247272a05c9 to your computer and use it in GitHub Desktop.
diff --git a/lib/install.js b/lib/install.js
index 32d9b10..066638d 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -102,6 +102,7 @@ var rimraf = require('rimraf')
var clone = require('lodash.clonedeep')
var iferr = require('iferr')
var validate = require('aproba')
+var mkdirp = require('mkdirp')
// npm internal utils
var npm = require('./npm.js')
@@ -248,10 +249,15 @@ Installer.prototype.finishTracker = function (tracker, cb) {
cb()
}
+Installer.prototype.prepareBaseDirectory = function (cb) {
+ mkdirp(this.where, cb);
+}
+
Installer.prototype.loadCurrentTree = function (cb) {
validate('F', arguments)
log.silly('install', 'loadCurrentTree')
chain([
+ [this, this.prepareBaseDirectory],
[this, this.readLocalPackageData],
[this, this.normalizeTree, log.newGroup('normalizeTree')]
], cb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment