Skip to content

Commit

Permalink
fix error when auth config is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
abelanger5 committed Jul 10, 2021
1 parent 08b73d9 commit caabb96
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 caabb96

Please sign in to comment.