Skip to content

Commit

Permalink
Merge pull request #875 from porter-dev/0.5.0-fix-nil-auth-config
Browse files Browse the repository at this point in the history
[0.5.0] Fix error when docker auth config is nil
  • Loading branch information
abelanger5 authored Jul 10, 2021
2 parents 08b73d9 + caabb96 commit 8b93510
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/cmd/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b93510

Please sign in to comment.