Skip to content

Commit 0de4d0d

Browse files
authored
Merge pull request #16 from dscho/retry-when-downloads-fail
Handle transient network problems gracefully
2 parents d1736c9 + 3c3a173 commit 0de4d0d

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

dist/index.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/downloader.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,15 @@ async function unpackTarXZInZipFromURL(
106106
const zipPath = `${tmp}/artifacts.zip`
107107
const curl = spawn(
108108
`${gitForWindowsMINGW64BinPath}/curl.exe`,
109-
['-o', zipPath, url],
109+
[
110+
'--retry',
111+
'16',
112+
'--retry-all-errors',
113+
'--retry-connrefused',
114+
'-o',
115+
zipPath,
116+
url
117+
],
110118
{stdio: [undefined, 'inherit', 'inherit']}
111119
)
112120
await new Promise<void>((resolve, reject) => {

0 commit comments

Comments
 (0)