diff options
Diffstat (limited to 'deps/npm/lib/install/action/remove.js')
-rw-r--r-- | deps/npm/lib/install/action/remove.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/deps/npm/lib/install/action/remove.js b/deps/npm/lib/install/action/remove.js index 47d5b766f7..9fe77c35e0 100644 --- a/deps/npm/lib/install/action/remove.js +++ b/deps/npm/lib/install/action/remove.js @@ -6,7 +6,7 @@ var asyncMap = require('slide').asyncMap var mkdirp = require('mkdirp') var npm = require('../../npm.js') var andIgnoreErrors = require('../and-ignore-errors.js') -var rename = require('../../utils/rename.js') +var move = require('../../utils/move.js') // This is weird because we want to remove the module but not it's node_modules folder // allowing for this allows us to not worry about the order of operations @@ -26,11 +26,11 @@ function removeLink (pkg, next) { function removeDir (pkg, log, next) { var modpath = path.join(path.dirname(pkg.path), '.' + path.basename(pkg.path) + '.MODULES') - rename(path.join(pkg.path, 'node_modules'), modpath, unbuildPackage) + move(path.join(pkg.path, 'node_modules'), modpath, unbuildPackage) - function unbuildPackage (renameEr) { + function unbuildPackage (moveEr) { npm.commands.unbuild(pkg.path, true, function () { - rimraf(pkg.path, renameEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack) + rimraf(pkg.path, moveEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack) }) } @@ -58,7 +58,7 @@ function removeDir (pkg, log, next) { var to = path.join(pkg.path, 'node_modules', file) // we ignore errors here, because they can legitimately happen, for instance, // bundled modules will be in both node_modules folders - rename(from, to, andIgnoreErrors(done)) + move(from, to, andIgnoreErrors(done)) }, cleanup) } |