mirror of
https://github.com/oven-sh/setup-bun.git
synced 2026-05-19 23:00:14 +02:00
fix: retry installing three times, add windows for testing (#72)
* ci: test windows * ci: specify shell * ci: we don't have >1.1.0 * fix: retry installing version three times * [autofix.ci] apply automated fixes * build: bump version to 1.2.1 * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function retry<T>(fn: () => Promise<T>, retries: number): Promise<T> {
|
||||
return fn().catch((err) => {
|
||||
if (retries <= 0) {
|
||||
throw err;
|
||||
}
|
||||
return retry(fn, retries - 1);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user