mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/docker/cli v24.0.5
Fix a panic when `auths: null` is found in the CLI config file. full diff: https://github.com/docker/cli/compare/v24.0.4...v24.0.5 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
3
vendor/github.com/docker/cli/cli/config/configfile/file.go
generated
vendored
3
vendor/github.com/docker/cli/cli/config/configfile/file.go
generated
vendored
@ -94,6 +94,9 @@ func (configFile *ConfigFile) ContainsAuth() bool {
|
||||
|
||||
// GetAuthConfigs returns the mapping of repo to auth configuration
|
||||
func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig {
|
||||
if configFile.AuthConfigs == nil {
|
||||
configFile.AuthConfigs = make(map[string]types.AuthConfig)
|
||||
}
|
||||
return configFile.AuthConfigs
|
||||
}
|
||||
|
||||
|
3
vendor/github.com/docker/cli/cli/config/credentials/file_store.go
generated
vendored
3
vendor/github.com/docker/cli/cli/config/credentials/file_store.go
generated
vendored
@ -52,7 +52,8 @@ func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) {
|
||||
|
||||
// Store saves the given credentials in the file store.
|
||||
func (c *fileStore) Store(authConfig types.AuthConfig) error {
|
||||
c.file.GetAuthConfigs()[authConfig.ServerAddress] = authConfig
|
||||
authConfigs := c.file.GetAuthConfigs()
|
||||
authConfigs[authConfig.ServerAddress] = authConfig
|
||||
return c.file.Save()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user