Skip to content

Commit 83cb4dd

Browse files
authored
Merge pull request urfave#2003 from urfave/bartekpacia/fix/build_error_output
improve output of build.go#downloadFile when download fails
2 parents 0c4c199 + 7478ef2 commit 83cb4dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func downloadFile(src, dest string, dirPerm, perm os.FileMode) error {
208208
defer resp.Body.Close()
209209

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

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

0 commit comments

Comments
 (0)