1
0
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:
Guillaume J. Charmes
2013-07-22 11:54:22 -07:00

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)) {
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