Merge pull request #916 from harshavardhana/pr_out_do_not_overwrite_if_user_already_had_expected_entries

Do not overwrite if user already had expected entries
This commit is contained in:
Harshavardhana
2015-07-23 21:38:35 +00:00
+6 -2
View File
@@ -198,8 +198,12 @@ func migrateConfigV1ToV101() {
localHostConfig.AccessKeyID = ""
localHostConfig.SecretAccessKey = ""
conf.Hosts["localhost:*"] = localHostConfig
conf.Hosts["127.0.0.1:*"] = localHostConfig
if _, ok := conf.Hosts["localhost:*"]; !ok {
conf.Hosts["localhost:*"] = localHostConfig
}
if _, ok := conf.Hosts["127.0.0.1:*"]; !ok {
conf.Hosts["127.0.0.1:*"] = localHostConfig
}
newConfig, err := quick.New(conf)
if err := newConfig.Save(mustGetMcConfigPath()); err != nil {