From 99e98da9957f1cd73872eaa690c98c131d6f3e2e Mon Sep 17 00:00:00 2001 From: James Ives Date: Sun, 27 Sep 2020 14:54:34 -0400 Subject: [PATCH] Adjustments --- src/git.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/git.ts b/src/git.ts index 05853bac..b32d217b 100644 --- a/src/git.ts +++ b/src/git.ts @@ -31,10 +31,12 @@ export async function init(action: ActionInterface): Promise { try { await execute(`git remote rm origin`, action.workspace, action.silent) - } finally { + if (action.isTest) { - info('Attempted to remove origin…') + throw new Error() } + } catch { + info('Attempted to remove origin but failed, continuing…') } await execute( @@ -183,10 +185,12 @@ export async function deploy(action: ActionInterface): Promise { try { await execute(`git stash apply`, action.workspace, action.silent) - } finally { + if (action.isTest) { - info('Attempted to apply stash…') + throw new Error() } + } catch { + info('Unable to apply from stash, continuing…') } }