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:
authorRebecca Turner <me@re-becca.org>2015-07-01 16:40:25 +0300
committerRebecca Turner <me@re-becca.org>2015-07-01 16:40:25 +0300
commitd6f7c986f790102556c81c1d74c279a0f711446a (patch)
treeb4b75b9df0aafbd7f6b6b4a780350ff954436325
parentb6948fbc41953e71597e79d8befbbaec506387d1 (diff)
install: Remove the largely untested move rollback code
-rw-r--r--lib/install/action/move.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/install/action/move.js b/lib/install/action/move.js
index 57aa5f7fb..cb707b6ad 100644
--- a/lib/install/action/move.js
+++ b/lib/install/action/move.js
@@ -24,32 +24,6 @@ module.exports = function (top, buildpath, pkg, log, next) {
], next)
}
-function noerrors () {
- var args = Array.prototype.slice.call(arguments)
- var todo = args.shift()
- var cb = args.pop()
- todo.apply(null, function (er) {
- if (er) {
- log.warn('move', er)
- }
- cb.apply(null, args)
- })
-}
-
-module.exports.rollback = function (buildpath, pkg, next) {
- chain([
- [noerrors, mkdirp, path.resolve(pkg.fromPath, '..')],
- [noerrors, lifecycle, pkg.package, 'preuninstall', pkg.path, false, true],
- [noerrors, lifecycle, pkg.package, 'uninstall', pkg.path, false, true],
- [noerrors, rmStuff, pkg.package, pkg.path],
- [noerrors, lifecycle, pkg.package, 'postuninstall', pkg.path, false, true],
- [noerrors, moveModuleOnly, pkg.path, pkg.fromPath],
- [noerrors, lifecycle, pkg.package, 'preinstall', pkg.fromPath, false, true],
- [noerrors, removeEmptyParents, path.resolve(pkg.path, '..')],
- [noerrors, updatePackageJson, pkg, pkg.fromPath]
- ], next)
-}
-
function removeEmptyParents (pkgdir, next) {
fs.rmdir(pkgdir, function (er) {
// FIXME: Make sure windows does what we want here