Skip to content

Commit e80c869

Browse files
committed
3.6.2 RC2
1 parent e383eb8 commit e80c869

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/git.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ function init(action) {
3131
yield execute_1.execute(`git config user.email "${action.email}"`, action.workspace, action.silent);
3232
try {
3333
yield execute_1.execute(`git remote rm origin`, action.workspace, action.silent);
34-
}
35-
finally {
3634
if (action.isTest) {
37-
core_1.info('Attempted to remove origin…');
35+
throw new Error();
3836
}
3937
}
38+
catch (_a) {
39+
core_1.info('Attempted to remove origin but failed, continuing…');
40+
}
4041
yield execute_1.execute(`git remote add origin ${action.repositoryPath}`, action.workspace, action.silent);
4142
if (action.preserve) {
4243
core_1.info(`Stashing workspace changes… ⬆️`);
@@ -117,12 +118,13 @@ function deploy(action) {
117118
core_1.info(`Applying stashed workspace changes… ⬆️`);
118119
try {
119120
yield execute_1.execute(`git stash apply`, action.workspace, action.silent);
120-
}
121-
finally {
122121
if (action.isTest) {
123-
core_1.info('Attempted to apply stash…');
122+
throw new Error();
124123
}
125124
}
125+
catch (_a) {
126+
core_1.info('Unable to apply from stash, continuing…');
127+
}
126128
}
127129
yield execute_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`, action.workspace, action.silent);
128130
// Ensures that items that need to be excluded from the clean job get parsed.
@@ -136,7 +138,7 @@ function deploy(action) {
136138
excludes += `--exclude ${item} `;
137139
}
138140
}
139-
catch (_a) {
141+
catch (_b) {
140142
core_1.info('There was an error parsing your CLEAN_EXCLUDE items. Please refer to the README for more details. ❌');
141143
}
142144
}

0 commit comments

Comments
 (0)