mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
removed useless buffered pipe in import
This commit is contained in:
parent
4d30a32c68
commit
a0880edc63
2 changed files with 2 additions and 8 deletions
|
@ -338,13 +338,7 @@ func (srv *Server) ImageImport(src, repo, tag string, file *os.File) error {
|
||||||
var resp *http.Response
|
var resp *http.Response
|
||||||
|
|
||||||
if src == "-" {
|
if src == "-" {
|
||||||
r, w := io.Pipe()
|
archive = file
|
||||||
go func() {
|
|
||||||
defer w.Close()
|
|
||||||
defer Debugf("Closing buffered stdin pipe")
|
|
||||||
io.Copy(w, file)
|
|
||||||
}()
|
|
||||||
archive = r
|
|
||||||
} else {
|
} else {
|
||||||
u, err := url.Parse(src)
|
u, err := url.Parse(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue