mirror of https://github.com/docker/docs.git
Small fix
This commit is contained in:
parent
582a9e0a67
commit
cfb8cbe521
|
@ -188,6 +188,9 @@ func (b *buildFile) CmdInsert(args string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *buildFile) CmdAdd(args string) error {
|
func (b *buildFile) CmdAdd(args string) error {
|
||||||
|
if b.context == "" {
|
||||||
|
return fmt.Errorf("No context given. Impossible to use ADD")
|
||||||
|
}
|
||||||
tmp := strings.SplitN(args, " ", 2)
|
tmp := strings.SplitN(args, " ", 2)
|
||||||
if len(tmp) != 2 {
|
if len(tmp) != 2 {
|
||||||
return fmt.Errorf("Invalid INSERT format")
|
return fmt.Errorf("Invalid INSERT format")
|
||||||
|
|
|
@ -175,7 +175,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
||||||
if _, err := w.CreateFormFile("Context", cmd.Arg(0)+"."+compression.Extension()); err != nil {
|
if _, err := w.CreateFormFile("Context", cmd.Arg(0)+"."+compression.Extension()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
multipartBody = io.MultiReader(multipartBody, utils.ProgressReader(ioutil.NopCloser(context), -1, os.Stdout, "Uploading Context %v/%v (%v)", false))
|
multipartBody = io.MultiReader(multipartBody, utils.ProgressReader(ioutil.NopCloser(context), -1, os.Stdout, "Uploading Context %v/%v (%v)\r", false))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the multipart request with correct content-type
|
// Send the multipart request with correct content-type
|
||||||
|
|
Loading…
Reference in New Issue