From 4432e167df8e81af56ff03cd8b8b397bff3e80fe Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Sun, 14 Sep 2025 19:04:19 +0200 Subject: [PATCH] protect golden images properly this was using the wrong key and resulted in the slice being empty. also guard against this by using UnmarshalStrict --- upload-vacuum/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upload-vacuum/main.go b/upload-vacuum/main.go index 7465cd8..95b1f63 100644 --- a/upload-vacuum/main.go +++ b/upload-vacuum/main.go @@ -168,7 +168,7 @@ func writeSHA256s(sha256s []string) { type config struct { TombstoneImages []string `yaml:"tombstone_images"` - GoldImages []string `yaml:"gold_images"` + GoldenImages []string `yaml:"golden_images"` } func readConfig(client *sftp.Client, path string) (*config, error) { @@ -184,7 +184,7 @@ func readConfig(client *sftp.Client, path string) (*config, error) { } var config config - err = yaml.Unmarshal(data, &config) + err = yaml.UnmarshalStrict(data, &config) if err != nil { return nil, err } @@ -293,7 +293,7 @@ func main() { for _, release := range config.TombstoneImages { toProtect = append(toProtect, release) } - for _, release := range config.GoldImages { + for _, release := range config.GoldenImages { toProtect = append(toProtect, release) }