From b2dd85d2fa42141fe8e0f437143b4c1fbf42e637 Mon Sep 17 00:00:00 2001 From: James Ives Date: Wed, 27 Apr 2022 12:42:49 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20Production=20Code=20for=20Commit=2092e?= =?UTF-8?q?fb78e2b2529d38939a751115b519ddfa69090=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/git.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/git.js b/lib/git.js index a7d4c2f9..51b8edf1 100644 --- a/lib/git.js +++ b/lib/git.js @@ -26,7 +26,7 @@ function init(action) { try { (0, core_1.info)(`Deploying using ${action.tokenType}… 🔑`); (0, core_1.info)('Configuring git…'); - function configureGit(throwOnError) { + function configure(throwOnError) { return __awaiter(this, void 0, void 0, function* () { try { yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}"`, action.workspace, action.silent); @@ -35,6 +35,7 @@ function init(action) { yield (0, execute_1.execute)(`git config core.ignorecase false`, action.workspace, action.silent); } catch (_a) { + (0, core_1.info)('There was a problemissue initilizing git, attempting to resolve …'); if (throwOnError) { throw new Error(); } @@ -42,13 +43,13 @@ function init(action) { }); } try { - yield configureGit(false); + yield configure(false); } catch (_a) { // Attempt to re-run if initial configuration failed using git init. yield (0, execute_1.execute)(`git init`, action.workspace, action.silent); yield (0, execute_1.execute)(`git commit -m "Initial commit" --allow-empty`, action.workspace, action.silent); - yield configureGit(true); + yield configure(true); } try { if ((process.env.CI && !action.sshKey) || action.isTest) {