Skip to content

Commit

Permalink
Merge pull request #2003 from urfave/bartekpacia/fix/build_error_output
Browse files Browse the repository at this point in the history
improve output of build.go#downloadFile when download fails
  • Loading branch information
bartekpacia authored Nov 2, 2024
2 parents 0c4c199 + 7478ef2 commit 83cb4dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func downloadFile(src, dest string, dirPerm, perm os.FileMode) error {
defer resp.Body.Close()

if resp.StatusCode >= 300 {
return fmt.Errorf("download response %[1]v", resp.StatusCode)
return fmt.Errorf("download file from %[2]s into %[3]s: response %[1]v", resp.StatusCode, src, dest)
}

if err := os.MkdirAll(filepath.Dir(dest), dirPerm); err != nil {
Expand Down

0 comments on commit 83cb4dd

Please sign in to comment.