diff options
Diffstat (limited to 'lib/deactivate.js')
-rw-r--r-- | lib/deactivate.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/deactivate.js b/lib/deactivate.js index 8cf32faa6..11be43f04 100644 --- a/lib/deactivate.js +++ b/lib/deactivate.js @@ -14,13 +14,18 @@ var mkdir = require("./utils/mkdir-p") module.exports = deactivate function deactivate (args, cb) { + var rb = npm.ROLLBACK + npm.ROLLBACK = true asyncMap(args.map(function (a) { return a.split("@").shift() }), preDeactivate, function (er, data) { if (er) return cb(er) asyncMap(data, deactivate_, 5, function (er) { if (er) return cb(er) - asyncMap(data, postDeactivate, cb) + asyncMap(data, postDeactivate, function (er) { + npm.ROLLBACK = rb + cb(er) + }) }) }) } |