system test t12_api sends empty keyRef string, making gpg fail

This commit is contained in:
Ales Bregar authored and André Roth committed 2026-06-19 22:20:45 +02:00
1 parent cb04fdc21c
commit 1e0330ba3e
1 file changed
+8 -5
+8 -5
View File
@@ -35,11 +35,14 @@ func (g *GpgSigner) SetBatch(batch bool) {
// SetKey sets key ID to use when signing files
func (g *GpgSigner) SetKey(keyRef string) {
if g.keyRefs == nil {
g.keyRefs = []string{strings.TrimSpace(keyRef)}
} else {
g.keyRefs = append(g.keyRefs, strings.TrimSpace(keyRef))
}
keyRef = strings.TrimSpace(keyRef)
if keyRef != "" {
if g.keyRefs == nil {
g.keyRefs = []string{keyRef}
} else {
g.keyRefs = append(g.keyRefs, keyRef)
}
}
}
// SetKeyRing allows to set custom keyring and secretkeyring