File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class LandingSession extends Session {
38
38
const shouldContinue = await cli . prompt (
39
39
`This PR ${ status } to land, do you want to continue?` , { defaultAnswer } ) ;
40
40
if ( ! shouldContinue ) {
41
+ cli . setExitCode ( 1 ) ;
41
42
return this . abort ( false ) ;
42
43
}
43
44
@@ -47,13 +48,19 @@ class LandingSession extends Session {
47
48
}
48
49
49
50
async abort ( tryResetBranch = true ) {
50
- const { cli } = this ;
51
- this . cleanFiles ( ) ;
52
- if ( tryResetBranch ) {
53
- await this . tryResetBranch ( ) ;
51
+ try {
52
+ const { cli } = this ;
53
+ this . cleanFiles ( ) ;
54
+ if ( tryResetBranch ) {
55
+ await this . tryResetBranch ( ) ;
56
+ }
57
+ cli . ok ( `Aborted \`git node land\` session in ${ this . ncuDir } ` ) ;
58
+ } catch ( ex ) {
59
+ const { cli } = this ;
60
+ cli . setExitCode ( 1 ) ;
61
+ cli . error ( `Couldn't abort \`git node land\` session in ${ this . ncuDir } ` ) ;
62
+ throw ex ;
54
63
}
55
- cli . ok ( `Aborted \`git node land\` session in ${ this . ncuDir } ` ) ;
56
- cli . setExitCode ( 1 ) ;
57
64
}
58
65
59
66
async downloadAndPatch ( ) {
You can’t perform that action at this time.
0 commit comments