diff options
author | Rebecca Turner <me@re-becca.org> | 2015-07-01 16:40:25 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-07-01 16:40:25 +0300 |
commit | d6f7c986f790102556c81c1d74c279a0f711446a (patch) | |
tree | b4b75b9df0aafbd7f6b6b4a780350ff954436325 | |
parent | b6948fbc41953e71597e79d8befbbaec506387d1 (diff) |
install: Remove the largely untested move rollback code
-rw-r--r-- | lib/install/action/move.js | 26 |
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 |