mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 12:38:24 +02:00
fix
This commit is contained in:
parent
932c3b236c
commit
090f970b70
3 changed files with 372 additions and 85 deletions
|
@ -1,5 +1,8 @@
|
|||
export function retry<T>(fn: () => Promise<T>, retries: number): Promise<T> {
|
||||
return fn().catch((err) => {
|
||||
console.log(`Remaining retries ${retries}`);
|
||||
console.log("Current error:");
|
||||
console.log(err);
|
||||
if (retries <= 0) {
|
||||
throw err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue