Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
/npmPublic archive

Commit45d40d9

Browse files
committed
install: Pass in better context to rollbacks
Credit:@iarnaReviewed-By:@zkatPR-URL:#14403Fixes:#13528Fixes:#14311
1 parentf78bde6 commit45d40d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎lib/install.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,10 @@ Installer.prototype.rollbackFailedOptional = function (staging, actionsToRun, cb
502502
}).filter(function(pkg){
503503
returnpkg.failed&&pkg.rollback
504504
})
505+
vartop=this.currentTree.path
505506
asyncMap(failed,function(pkg,next){
506507
asyncMap(pkg.rollback,function(rollback,done){
507-
rollback(staging,pkg,done)
508+
rollback(top,staging,pkg,done)
508509
},next)
509510
},cb)
510511
}

‎lib/install/action/finalize.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ module.exports = function (top, buildpath, pkg, log, next) {
7676
}
7777
}
7878

79-
module.exports.rollback=function(buildpath,pkg,next){
80-
vartop=path.resolve(buildpath,'..')
79+
module.exports.rollback=function(top,staging,pkg,next){
8180
rimraf(pkg.path,function(){
8281
removeEmptyParents(pkg.path)
8382
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp