@@ -31,12 +31,13 @@ function init(action) {
31
31
yield execute_1 . execute ( `git config user.email "${ action . email } "` , action . workspace , action . silent ) ;
32
32
try {
33
33
yield execute_1 . execute ( `git remote rm origin` , action . workspace , action . silent ) ;
34
- }
35
- finally {
36
34
if ( action . isTest ) {
37
- core_1 . info ( 'Attempted to remove origin…' ) ;
35
+ throw new Error ( ) ;
38
36
}
39
37
}
38
+ catch ( _a ) {
39
+ core_1 . info ( 'Attempted to remove origin but failed, continuing…' ) ;
40
+ }
40
41
yield execute_1 . execute ( `git remote add origin ${ action . repositoryPath } ` , action . workspace , action . silent ) ;
41
42
if ( action . preserve ) {
42
43
core_1 . info ( `Stashing workspace changes… ⬆️` ) ;
@@ -117,12 +118,13 @@ function deploy(action) {
117
118
core_1 . info ( `Applying stashed workspace changes… ⬆️` ) ;
118
119
try {
119
120
yield execute_1 . execute ( `git stash apply` , action . workspace , action . silent ) ;
120
- }
121
- finally {
122
121
if ( action . isTest ) {
123
- core_1 . info ( 'Attempted to apply stash…' ) ;
122
+ throw new Error ( ) ;
124
123
}
125
124
}
125
+ catch ( _a ) {
126
+ core_1 . info ( 'Unable to apply from stash, continuing…' ) ;
127
+ }
126
128
}
127
129
yield execute_1 . execute ( `git worktree add --checkout ${ temporaryDeploymentDirectory } origin/${ action . branch } ` , action . workspace , action . silent ) ;
128
130
// Ensures that items that need to be excluded from the clean job get parsed.
@@ -136,7 +138,7 @@ function deploy(action) {
136
138
excludes += `--exclude ${ item } ` ;
137
139
}
138
140
}
139
- catch ( _a ) {
141
+ catch ( _b ) {
140
142
core_1 . info ( 'There was an error parsing your CLEAN_EXCLUDE items. Please refer to the README for more details. ❌' ) ;
141
143
}
142
144
}
0 commit comments