mirror of
https://github.com/docker/cli.git
synced 2026-01-19 21:41:31 +03:00
Merge pull request #1262 from dotcloud/1253_add_directory_check
* Runtime: fix error message when invalid directory Upstream-commit: a675da65e97ac8847f0e22719e2cfdebba201235 Component: engine
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user