Merge pull request #1262 from dotcloud/1253_add_directory_check

* Runtime: fix error message when invalid directory
This commit is contained in:
Guillaume J. Charmes 2013-07-22 11:54:22 -07:00
commit a675da65e9
1 changed files with 3 additions and 0 deletions

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