diff --git a/packages/cypress-cloud/lib/cypress/cypress.ts b/packages/cypress-cloud/lib/cypress/cypress.ts index 24a1819..c9dfce9 100644 --- a/packages/cypress-cloud/lib/cypress/cypress.ts +++ b/packages/cypress-cloud/lib/cypress/cypress.ts @@ -59,9 +59,10 @@ export async function runSpecFile( let retries = 0; const currentsConfig = await getCurrentsConfig(); + while ( currentsConfig.retry && - retries < currentsConfig.retry.hardFailureMaxRetries && + retries < (currentsConfig.retry.hardFailureMaxRetries ?? 0) && result.status === "failed" ) { warn("Cypress runner failed with message: %s", result.message);