Skip to content

Commit 3712344

Browse files
committed
Improve defaultauthconfig loading
1 parent 179f497 commit 3712344

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/devspace/builder/docker/auth.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ func getDefaultAuthConfig(client client.CommonAPIClient, checkCredStore bool, se
4242
var authconfig types.AuthConfig
4343
var err error
4444

45-
configfile, _ := loadDockerConfig()
46-
4745
if !isDefaultRegistry {
4846
serverAddress = registry.ConvertToHostname(serverAddress)
4947
}
5048

5149
if checkCredStore {
52-
authconfig, err = configfile.GetAuthConfig(serverAddress)
53-
} else {
54-
authconfig = types.AuthConfig{}
50+
configfile, err := loadDockerConfig()
51+
52+
if configfile != nil && err == nil {
53+
authconfig, err = configfile.GetAuthConfig(serverAddress)
54+
}
5555
}
5656

5757
authconfig.ServerAddress = serverAddress

0 commit comments

Comments
 (0)