mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
increase
This commit is contained in:
parent
4be6d096f9
commit
1bacd6f089
3 changed files with 3 additions and 3 deletions
2
dist/setup/index.js
generated
vendored
2
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -88,7 +88,7 @@ export default async (options: Input): Promise<Output> => {
|
||||||
if (!cacheHit) {
|
if (!cacheHit) {
|
||||||
info(`Downloading a new version of Bun: ${url}`);
|
info(`Downloading a new version of Bun: ${url}`);
|
||||||
// TODO: remove this, temporary fix for https://github.com/oven-sh/setup-bun/issues/73
|
// TODO: remove this, temporary fix for https://github.com/oven-sh/setup-bun/issues/73
|
||||||
revision = await retry(async () => await downloadBun(url, bunPath), 3);
|
revision = await retry(async () => await downloadBun(url, bunPath), 5);
|
||||||
console.log("Downloaded Bun revision: " + revision);
|
console.log("Downloaded Bun revision: " + revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export function retry<T>(
|
export function retry<T>(
|
||||||
fn: () => Promise<T>,
|
fn: () => Promise<T>,
|
||||||
retries: number,
|
retries: number,
|
||||||
timeout = 5000
|
timeout = 10000
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
return fn().catch((err) => {
|
return fn().catch((err) => {
|
||||||
if (retries <= 0) {
|
if (retries <= 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue