Skip to content

Commit

Permalink
Deploy Production Code for Commit 9e22cdc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Sep 27, 2024
1 parent 9e22cdc commit 56d4ca7
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,12 @@ function init(action) {
(0, core_1.info)(`Deploying using ${action.tokenType}… 🔑`);
(0, core_1.info)('Configuring git…');
/**
* Add safe directory to the global git config.
*/
try {
yield (0, execute_1.execute)(`git config --global safe.directory '*'`, action.workspace, action.silent);
}
catch (_a) {
(0, core_1.info)('Unable to set workflow file tree as a safe directory…');
}
/**
* Ensure that the workspace is a safe directory, this is somewhat redundant as the action
* will always set the workspace as a safe directory, but this is a fallback in case the action
* fails to do so.
* Ensure that the workspace is a safe directory.
*/
try {
yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}"`, action.workspace, action.silent);
}
catch (_b) {
catch (_a) {
(0, core_1.info)('Unable to set workspace as a safe directory…');
}
yield (0, execute_1.execute)(`git config user.name "${action.name}"`, action.workspace, action.silent);
Expand All @@ -63,7 +52,7 @@ function init(action) {
throw new Error();
}
}
catch (_c) {
catch (_b) {
(0, core_1.info)('Unable to unset previous git config authentication as it may not exist, continuing…');
}
try {
Expand All @@ -72,7 +61,7 @@ function init(action) {
throw new Error();
}
}
catch (_d) {
catch (_c) {
(0, core_1.info)('Attempted to remove origin but failed, continuing…');
}
yield (0, execute_1.execute)(`git remote add origin ${action.repositoryPath}`, action.workspace, action.silent);
Expand Down

0 comments on commit 56d4ca7

Please sign in to comment.