aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/gpg/gpgbin/keys.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/gpg/gpgbin/keys.go')
-rw-r--r--lib/crypto/gpg/gpgbin/keys.go5
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")
}