fix gpg setting

Init is actually never called and I have no clue why it is there if it is
not called.
Take this opportunity to introduce a New function which only does the
helper lookup and panics iff that fails. Panic may be a bit too aggressive,
but seems the most certain way to get out of not finding a suitable gpg1
binary.
This commit is contained in:
Harald Sitter
2018-04-26 09:18:06 +02:00
parent f89e322ece
commit 5a713534c6
3 changed files with 32 additions and 28 deletions
+2 -2
View File
@@ -400,7 +400,7 @@ func (context *AptlyContext) GetSigner() pgp.Signer {
defer context.Unlock()
if context.pgpProvider() == "gpg" { // nolint: goconst
return &pgp.GpgSigner{}
return pgp.NewGpgSigner()
}
return &pgp.GoSigner{}
@@ -412,7 +412,7 @@ func (context *AptlyContext) GetVerifier() pgp.Verifier {
defer context.Unlock()
if context.pgpProvider() == "gpg" { // nolint: goconst
return &pgp.GpgVerifier{}
return pgp.NewGpgVerifier()
}
return &pgp.GoVerifier{}