mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
This commit is contained in:
+4
-1
@@ -89,7 +89,7 @@ func Pv(src io.Reader, info io.Writer) io.Reader {
|
||||
// the body of the response. If `stderr` is not nil, a progress bar will be
|
||||
// written to it.
|
||||
func Curl(url string, stderr io.Writer) (io.Reader, error) {
|
||||
curl := exec.Command("curl", "-#", "-L", url)
|
||||
curl := exec.Command("curl", "-#", "-L", "--fail", url)
|
||||
output, err := curl.StdoutPipe()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -98,5 +98,8 @@ func Curl(url string, stderr io.Writer) (io.Reader, error) {
|
||||
if err := curl.Start(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := curl.Wait(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return output, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user