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:
parent
4e7f2b757e
commit
74a2b13687
1 changed files with 3 additions and 0 deletions
|
@ -185,6 +185,9 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
|||
} else if utils.IsURL(cmd.Arg(0)) || utils.IsGIT(cmd.Arg(0)) {
|
||||
isRemote = true
|
||||
} else {
|
||||
if _, err := os.Stat(cmd.Arg(0)); err != nil {
|
||||
return err
|
||||
}
|
||||
context, err = Tar(cmd.Arg(0), Uncompressed)
|
||||
}
|
||||
var body io.Reader
|
||||
|
|
Loading…
Reference in a new issue