Skip to content

Commit 56d4ca7

Browse files
committed
Deploy Production Code for Commit 9e22cdc 🚀
1 parent 9e22cdc commit 56d4ca7

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

lib/git.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,12 @@ function init(action) {
3030
(0, core_1.info)(`Deploying using ${action.tokenType}… 🔑`);
3131
(0, core_1.info)('Configuring git…');
3232
/**
33-
* Add safe directory to the global git config.
34-
*/
35-
try {
36-
yield (0, execute_1.execute)(`git config --global safe.directory '*'`, action.workspace, action.silent);
37-
}
38-
catch (_a) {
39-
(0, core_1.info)('Unable to set workflow file tree as a safe directory…');
40-
}
41-
/**
42-
* Ensure that the workspace is a safe directory, this is somewhat redundant as the action
43-
* will always set the workspace as a safe directory, but this is a fallback in case the action
44-
* fails to do so.
33+
* Ensure that the workspace is a safe directory.
4534
*/
4635
try {
4736
yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}"`, action.workspace, action.silent);
4837
}
49-
catch (_b) {
38+
catch (_a) {
5039
(0, core_1.info)('Unable to set workspace as a safe directory…');
5140
}
5241
yield (0, execute_1.execute)(`git config user.name "${action.name}"`, action.workspace, action.silent);
@@ -63,7 +52,7 @@ function init(action) {
6352
throw new Error();
6453
}
6554
}
66-
catch (_c) {
55+
catch (_b) {
6756
(0, core_1.info)('Unable to unset previous git config authentication as it may not exist, continuing…');
6857
}
6958
try {
@@ -72,7 +61,7 @@ function init(action) {
7261
throw new Error();
7362
}
7463
}
75-
catch (_d) {
64+
catch (_c) {
7665
(0, core_1.info)('Attempted to remove origin but failed, continuing…');
7766
}
7867
yield (0, execute_1.execute)(`git remote add origin ${action.repositoryPath}`, action.workspace, action.silent);

0 commit comments

Comments
 (0)