Merge pull request #47 from arapulido/fix_crash_when_config_file_is_empty
If the hyper config file is not set, the AuthConfig should be empty
This commit is contained in:
@@ -333,8 +333,10 @@ func (p *HyperProvider) ensureImage(image string) error {
|
|||||||
|
|
||||||
// Resolve the Repository name from fqn to RepositoryInfo
|
// Resolve the Repository name from fqn to RepositoryInfo
|
||||||
repoInfo, err := registry.ParseRepositoryInfo(distributionRef)
|
repoInfo, err := registry.ParseRepositoryInfo(distributionRef)
|
||||||
|
var authConfig types.AuthConfig
|
||||||
authConfig := p.resolveAuthConfig(p.configFile.AuthConfigs, repoInfo.Index)
|
if p.configFile != nil {
|
||||||
|
authConfig = p.resolveAuthConfig(p.configFile.AuthConfigs, repoInfo.Index)
|
||||||
|
}
|
||||||
encodedAuth, err := p.encodeAuthToBase64(authConfig)
|
encodedAuth, err := p.encodeAuthToBase64(authConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user