aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2024-08-09 17:50:07 -0500
committerRobin Jarry <robin@jarry.cc>2024-08-20 09:30:13 +0200
commita2cf34e2b46268455b0224d062419bc091dc5f9c (patch)
treed188ec9d6e2329dbf67b4781d4e1659bb34144fa
parentda5ca1a53043b6b3d8c5bfc7f6eff340985e3edb (diff)
downloadaerc-a2cf34e2b46268455b0224d062419bc091dc5f9c.tar.gz
log: explain why the signature command failed
It wasn't previously apparent why the command failed. Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--lib/state/templates.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/state/templates.go b/lib/state/templates.go
index c7bfad8c..390ab131 100644
--- a/lib/state/templates.go
+++ b/lib/state/templates.go
@@ -3,6 +3,7 @@ package state
import (
"bufio"
"bytes"
+ "errors"
"fmt"
"os"
"os/exec"
@@ -698,6 +699,10 @@ func (d *templateData) Signature() string {
var err error
signature, err = d.readSignatureFromCmd()
if err != nil {
+ var execErr *exec.ExitError
+ if errors.As(err, &execErr) {
+ log.Warnf("signature command failed with error (%d): %s", execErr.ExitCode(), execErr.Stderr)
+ }
signature = d.readSignatureFromFile()
}
} else {