Browse Source

Make sure ENV instruction within build perform a commit each time

Guillaume J. Charmes 12 năm trước cách đây
mục cha
commit
6a6a2ad8a4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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))
 }