浏览代码

Merge pull request #695 from dtzWill/694-fix-merge-config

- Runtime: utils.go: Fix merge logic for user and hostname.
Guillaume J. Charmes 12 年之前
父节点
当前提交
ecb64be6a8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      utils.go

+ 2 - 2
utils.go

@@ -49,10 +49,10 @@ func CompareConfig(a, b *Config) bool {
 }
 
 func MergeConfig(userConf, imageConf *Config) {
-	if userConf.Hostname != "" {
+	if userConf.Hostname == "" {
 		userConf.Hostname = imageConf.Hostname
 	}
-	if userConf.User != "" {
+	if userConf.User == "" {
 		userConf.User = imageConf.User
 	}
 	if userConf.Memory == 0 {