Re-enabled CmdPull progress bar code which had been temporarily disabled
This commit is contained in:
parent
2192d3371c
commit
5675439b91
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/dotcloud/docker/image"
|
"github.com/dotcloud/docker/image"
|
||||||
"github.com/dotcloud/docker/rcli"
|
"github.com/dotcloud/docker/rcli"
|
||||||
"io"
|
"io"
|
||||||
// "net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -393,20 +393,20 @@ func (srv *Server) CmdPull(stdin io.ReadCloser, stdout io.Writer, args ...string
|
||||||
fmt.Fprintf(stdout, "Downloading from %s\n", u.String())
|
fmt.Fprintf(stdout, "Downloading from %s\n", u.String())
|
||||||
// Download with curl (pretty progress bar)
|
// Download with curl (pretty progress bar)
|
||||||
// If curl is not available, fallback to http.Get()
|
// If curl is not available, fallback to http.Get()
|
||||||
// archive, err := future.Curl(u.String(), stdout)
|
archive, err := future.Curl(u.String(), stdout)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// if resp, err := http.Get(u.String()); err != nil {
|
if resp, err := http.Get(u.String()); err != nil {
|
||||||
// return err
|
return err
|
||||||
// } else {
|
} else {
|
||||||
// archive = resp.Body
|
archive = resp.Body
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// fmt.Fprintf(stdout, "Unpacking to %s\n", name)
|
fmt.Fprintf(stdout, "Unpacking to %s\n", name)
|
||||||
// img, err := srv.images.Import(name, archive, nil)
|
img, err := srv.images.Import(name, archive, nil)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// return err
|
return err
|
||||||
// }
|
}
|
||||||
// fmt.Fprintln(stdout, img.Id)
|
fmt.Fprintln(stdout, img.Id)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue