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

fix error message when invalid directory

This commit is contained in:
Victor Vieux 2013-07-22 14:52:05 +00:00
parent 4e7f2b757e
commit 74a2b13687

View file

@ -185,6 +185,9 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
} else if utils.IsURL(cmd.Arg(0)) || utils.IsGIT(cmd.Arg(0)) { } else if utils.IsURL(cmd.Arg(0)) || utils.IsGIT(cmd.Arg(0)) {
isRemote = true isRemote = true
} else { } else {
if _, err := os.Stat(cmd.Arg(0)); err != nil {
return err
}
context, err = Tar(cmd.Arg(0), Uncompressed) context, err = Tar(cmd.Arg(0), Uncompressed)
} }
var body io.Reader var body io.Reader