fix: treat the registry file as a pointer
This commit is contained in:
1 parent
09ca1f1299
commit
a354210f67
1 file changed
+2
-2
@@ -86,13 +86,13 @@ func TriggerPostRegistryLogin(server string, username string) error {
|
|||||||
|
|
||||||
password := os.Getenv("DOCKER_REGISTRY_PASS")
|
password := os.Getenv("DOCKER_REGISTRY_PASS")
|
||||||
|
|
||||||
registry := registries.Registry{}
|
|
||||||
yamlFile, err := os.ReadFile(RegistryConfigPath)
|
yamlFile, err := os.ReadFile(RegistryConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Unable to read existing registries.yaml: %w", err)
|
return fmt.Errorf("Unable to read existing registries.yaml: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = yaml.Unmarshal(yamlFile, registry)
|
var registry registries.Registry
|
||||||
|
err = yaml.Unmarshal(yamlFile, ®istry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Unable to unmarshal registry configuration from yaml: %w", err)
|
return fmt.Errorf("Unable to unmarshal registry configuration from yaml: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user