Browse code

Make sure ENV instruction within build perform a commit each time

Guillaume J. Charmes authored on 2013/08/08 09:23:49
Showing 1 changed files
... ...
@@ -172,9 +172,9 @@ func (b *buildFile) CmdEnv(args string) error {
172 172
 
173 173
 	if envKey >= 0 {
174 174
 		b.config.Env[envKey] = replacedVar
175
-		return nil
175
+	} else {
176
+		b.config.Env = append(b.config.Env, replacedVar)
176 177
 	}
177
-	b.config.Env = append(b.config.Env, replacedVar)
178 178
 	return b.commit("", b.config.Cmd, fmt.Sprintf("ENV %s", replacedVar))
179 179
 }
180 180