diff --git a/src/helpers.ts b/src/helpers.ts index 18295e4..468a12d 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -260,13 +260,13 @@ export async function retryAndBackoff( `Retrying after ${Math.floor(delay)}ms.`, ); - await sleep(delay); - if (nextRetry >= maxRetries) { core.info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`); throw err; } + await sleep(delay); + return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label); } }