diff options
Diffstat (limited to 'lib/crypto/gpg/gpgbin/keys.go')
-rw-r--r-- | lib/crypto/gpg/gpgbin/keys.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/crypto/gpg/gpgbin/keys.go b/lib/crypto/gpg/gpgbin/keys.go index bef90cf6..ca166e9d 100644 --- a/lib/crypto/gpg/gpgbin/keys.go +++ b/lib/crypto/gpg/gpgbin/keys.go @@ -36,7 +36,10 @@ func ExportPublicKey(k string) (io.Reader, error) { var stderr strings.Builder cmd.Stdout = &outbuf cmd.Stderr = &stderr - cmd.Run() + err := cmd.Run() + if err != nil { + return nil, fmt.Errorf("gpg: export failed: %w", err) + } if strings.Contains(stderr.String(), "gpg") { return nil, fmt.Errorf("gpg: error exporting key") } |