fix: 🐛 Fixes an issue where informational messages are throwing errors (#1168)

This commit is contained in:
James Ives 2022-07-20 11:01:00 -04:00 committed by GitHub
parent 1dfbc4c37b
commit 331dd26e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,9 +308,10 @@ export async function deploy(action: ActionInterface): Promise<Status> {
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)
}