Kaynağa Gözat

Merge pull request #875 from porter-dev/0.5.0-fix-nil-auth-config

[0.5.0] Fix error when docker auth config is nil
abelanger5 4 yıl önce
ebeveyn
işleme
df398abca6
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      cli/cmd/docker.go

+ 4 - 0
cli/cmd/docker.go

@@ -138,6 +138,10 @@ func dockerConfig(user *api.AuthCheckResponse, client *api.Client, args []string
 		configFile.CredentialHelpers = make(map[string]string)
 	}
 
+	if configFile.AuthConfigs == nil {
+		configFile.AuthConfigs = make(map[string]types.AuthConfig)
+	}
+
 	for _, regURL := range regToAdd {
 		// if this is a dockerhub registry, see if an auth config has already been generated
 		// for index.docker.io