From 080f35fe65a7bb88ccf2abefa985c7a4ae88a47b Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Fri, 14 Jun 2013 16:24:22 -0700 Subject: [PATCH] Fix a bug which caused builds to fail if ADD was the first command --- buildfile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildfile.go b/buildfile.go index 3c706b04ba..aaa6f6bc7c 100644 --- a/buildfile.go +++ b/buildfile.go @@ -178,6 +178,8 @@ func (b *buildFile) CmdAdd(args string) error { cmd := b.config.Cmd // Create the container and start it + b.config.Cmd = []string{"/bin/sh", "-c", fmt.Sprintf("#(nop) ADD %s in %s", orig, dest)} + b.config.Image = b.image container, err := b.builder.Create(b.config) if err != nil { return err