Danger/CI: Correctly swallow async errors

This commit is contained in:
Jamie Kyle 2022-12-14 10:13:03 -08:00 committed by GitHub
parent b138774454
commit 624adca360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,10 +15,14 @@ function isGitDeletedError(error: unknown) {
); );
} }
try { async function main() {
run(migrateBackboneToRedux(), packageJsonVersionsShouldBePinned()); try {
} catch (error: unknown) { await run(migrateBackboneToRedux(), packageJsonVersionsShouldBePinned());
if (!isGitDeletedError(error)) { } catch (error: unknown) {
throw error; if (!isGitDeletedError(error)) {
throw error;
}
} }
} }
main();