1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

Returning stderr when gpg encrypt fails (#762)

Co-authored-by: AJ Bahnken <1144310+ajvb@users.noreply.github.com>
This commit is contained in:
cloudstarz
2020-10-29 16:00:20 -07:00
committed by GitHub
parent d8a64281ae
commit 886c1ee781

View File

@@ -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