1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Small fix

This commit is contained in:
Guillaume J. Charmes 2013-05-28 13:51:21 -07:00
parent 582a9e0a67
commit cfb8cbe521
2 changed files with 4 additions and 1 deletions

View file

@ -188,6 +188,9 @@ func (b *buildFile) CmdInsert(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)
if len(tmp) != 2 {
return fmt.Errorf("Invalid INSERT format")

View file

@ -175,7 +175,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
if _, err := w.CreateFormFile("Context", cmd.Arg(0)+"."+compression.Extension()); err != nil {
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