From 81db737cc810748d2def894a28ce13098f69e63a Mon Sep 17 00:00:00 2001 From: James Ives Date: Wed, 27 Apr 2022 08:41:37 -0400 Subject: [PATCH] Update git.ts --- src/git.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/git.ts b/src/git.ts index 8f689d4e..54294751 100644 --- a/src/git.ts +++ b/src/git.ts @@ -21,7 +21,7 @@ export async function init(action: ActionInterface): Promise { info(`Deploying using ${action.tokenType}… 🔑`) info('Configuring git…') - async function configureGit(throwOnError: boolean) { + async function configure(throwOnError: boolean) { try { await execute( `git config --global --add safe.directory "${action.workspace}"`, @@ -47,6 +47,9 @@ export async function init(action: ActionInterface): Promise { action.silent ) } catch { + info( + 'There was a problemissue initilizing git, attempting to resolve …' + ) if (throwOnError) { throw new Error() } @@ -54,7 +57,7 @@ export async function init(action: ActionInterface): Promise { } try { - await configureGit(false) + await configure(false) } catch { // Attempt to re-run if initial configuration failed using git init. await execute(`git init`, action.workspace, action.silent) @@ -65,7 +68,7 @@ export async function init(action: ActionInterface): Promise { action.silent ) - await configureGit(true) + await configure(true) } try {