Skip to content

Commit 0a882d3

Browse files
cfergeaupraveenkumar
authored andcommitted
download: Fix error reporting on download errors
The code is checking for resp.Err() != nil, but returning err rather than resp.Err()
1 parent 2ecc7e7 commit 0a882d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/download/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func Download(uri, destination string, mode os.FileMode, sha256sum []byte) (stri
3535
resp := <-respCh
3636

3737
if resp.Err() != nil {
38-
return "", err
38+
return "", resp.Err()
3939
}
4040

4141
if err := os.Chmod(resp.Filename, mode); err != nil {

0 commit comments

Comments
 (0)