From 74a2b13687787a33b0963f020f704d3cdde4b06d Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 22 Jul 2013 14:52:05 +0000 Subject: [PATCH] fix error message when invalid directory --- commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands.go b/commands.go index 86385f4187..b0e32162e6 100644 --- a/commands.go +++ b/commands.go @@ -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