fix: treat the registry file as a pointer

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-20 06:57:01 -05:00
parent 09ca1f1299
commit a354210f67

View File

@@ -86,13 +86,13 @@ func TriggerPostRegistryLogin(server string, username string) error {
password := os.Getenv("DOCKER_REGISTRY_PASS")
registry := registries.Registry{}
yamlFile, err := os.ReadFile(RegistryConfigPath)
if err != nil {
return fmt.Errorf("Unable to read existing registries.yaml: %w", err)
}
err = yaml.Unmarshal(yamlFile, registry)
var registry registries.Registry
err = yaml.Unmarshal(yamlFile, &registry)
if err != nil {
return fmt.Errorf("Unable to unmarshal registry configuration from yaml: %w", err)
}