refactor: move registry path to const

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-01-23 03:00:27 -05:00
1 parent a90f6bdee8
commit e13561ec4d
3 files changed
+5 -4

No files matched your search

+1 -2
View File
@@ -85,8 +85,7 @@ func TriggerPostRegistryLogin(server string, username string, password string) e
}
registry := registries.Registry{}
registryFile := "/etc/rancher/k3s/registries.yaml"
yamlFile, err := os.ReadFile(registryFile)
yamlFile, err := os.ReadFile(RegistryConfigPath)
if err != nil {
return fmt.Errorf("Unable to read existing registries.yaml: %w", err)
}