From 886c1ee78144be6328f546d3aae09445562aefff Mon Sep 17 00:00:00 2001 From: cloudstarz Date: Thu, 29 Oct 2020 16:00:20 -0700 Subject: [PATCH] Returning stderr when gpg encrypt fails (#762) Co-authored-by: AJ Bahnken <1144310+ajvb@users.noreply.github.com> --- pgp/keysource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgp/keysource.go b/pgp/keysource.go index 3a126484a..f025c66a2 100644 --- a/pgp/keysource.go +++ b/pgp/keysource.go @@ -80,7 +80,7 @@ func (key *MasterKey) encryptWithGPGBinary(dataKey []byte) error { cmd.Stderr = &stderr err := cmd.Run() if err != nil { - return err + return fmt.Errorf("gpg binary failed with error: %s, %s", err, stderr.String()) } key.EncryptedKey = stdout.String() return nil