fix: treat the registry file as a pointer

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-01-23 03:00:27 -05:00
1 parent 09ca1f1299
commit a354210f67
1 file changed
+2 -2
+2 -2
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)
}