Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling the progress log when downloading files on windows #2006

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/blob/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (d *downloader) Download(ctx context.Context, pathOrURI string) (Blob, erro
path, err = paths.URIToFilePath(pathOrURI)
case "http", "https":
path, err = d.handleHTTP(ctx, pathOrURI)
if err != nil {
// retry as we sometimes see `wsarecv: An existing connection was forcibly closed by the remote host.` on Windows
path, err = d.handleHTTP(ctx, pathOrURI)
}
default:
err = fmt.Errorf("unsupported protocol %s in URI %s", style.Symbol(parsedURL.Scheme), style.Symbol(pathOrURI))
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/blob/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ func testDownloader(t *testing.T, when spec.G, it spec.S) {
server.AppendHandlers(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(404)
})

server.AppendHandlers(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(404)
})
})

it("should return error", func() {
Expand Down
Loading