Sfoglia il codice sorgente

Merge pull request #1456 from dotcloud/1455-force_commit_build_env

Make sure ENV instruction within build perform a commit each time
Victor Vieux 12 anni fa
parent
commit
5928ed5d45
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      buildfile.go

+ 2 - 2
buildfile.go

@@ -172,9 +172,9 @@ func (b *buildFile) CmdEnv(args string) error {
 
 	if envKey >= 0 {
 		b.config.Env[envKey] = replacedVar
-		return nil
+	} else {
+		b.config.Env = append(b.config.Env, replacedVar)
 	}
-	b.config.Env = append(b.config.Env, replacedVar)
 	return b.commit("", b.config.Cmd, fmt.Sprintf("ENV %s", replacedVar))
 }