mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
system test t12_api sends empty keyRef string, making gpg fail
This commit is contained in:
13
pgp/gnupg.go
13
pgp/gnupg.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user