Skip to content

Commit

Permalink
Merge pull request #16 from dscho/retry-when-downloads-fail
Browse files Browse the repository at this point in the history
Handle transient network problems gracefully
  • Loading branch information
dscho authored Feb 27, 2021
2 parents d1736c9 + 3c3a173 commit 0de4d0d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@ async function unpackTarXZInZipFromURL(
const zipPath = `${tmp}/artifacts.zip`
const curl = spawn(
`${gitForWindowsMINGW64BinPath}/curl.exe`,
['-o', zipPath, url],
[
'--retry',
'16',
'--retry-all-errors',
'--retry-connrefused',
'-o',
zipPath,
url
],
{stdio: [undefined, 'inherit', 'inherit']}
)
await new Promise<void>((resolve, reject) => {
Expand Down

0 comments on commit 0de4d0d

Please sign in to comment.