From 331dd26e8dd42388b511f675d61312af47f24606 Mon Sep 17 00:00:00 2001 From: James Ives Date: Wed, 20 Jul 2022 11:01:00 -0400 Subject: [PATCH] fix: :bug: Fixes an issue where informational messages are throwing errors (#1168) --- src/git.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/git.ts b/src/git.ts index 5f6a73d6d..85769bf1f 100644 --- a/src/git.ts +++ b/src/git.ts @@ -308,9 +308,10 @@ export async function deploy(action: ActionInterface): Promise { if (rejected) info('Updates were rejected') - // If the push failed for any reason other than being rejected, + // If the push failed for any fatal reason other than being rejected, // there is a problem - if (!rejected && pushResult.stderr) throw new Error(pushResult.stderr) + if (!rejected && pushResult.stderr.startsWith('fatal:')) + throw new Error(pushResult.stderr) } while (rejected) }