aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-01-20 18:33:17 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-01-20 18:35:29 +0100
commitde0dc58b99ec66b0b103186b4ecf90cc2481b508 (patch)
tree30833ed56d493567a041bf347dd337020849b6a3
parent059825f1698eaf2c282bf5a925feb157954d430f (diff)
downloadgallery-de0dc58b99ec66b0b103186b4ecf90cc2481b508.tar.gz
gallery-de0dc58b99ec66b0b103186b4ecf90cc2481b508.tar.xz
gallery-de0dc58b99ec66b0b103186b4ecf90cc2481b508.zip
gallery: don't be silent about signalled children
-rw-r--r--main.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.go b/main.go
index 972e1b3..384cf85 100644
--- a/main.go
+++ b/main.go
@@ -1415,7 +1415,11 @@ func syncPostProcess(c *syncContext, info syncFileInfo) error {
case info.err != nil:
// * → error
if ee, ok := info.err.(*exec.ExitError); ok {
- syncPrintf(c, "%s: %s", info.fsPath, ee.Stderr)
+ message := string(ee.Stderr)
+ if message == "" {
+ message = ee.String()
+ }
+ syncPrintf(c, "%s: %s", info.fsPath, message)
} else {
return info.err
}
@@ -2237,7 +2241,10 @@ func cmdThumbnail(fs *flag.FlagSet, args []string) error {
w, h, err := makeThumbnail(*load, pathImage, pathThumb)
if err != nil {
if ee, ok := err.(*exec.ExitError); ok {
- return string(ee.Stderr), nil
+ if message = string(ee.Stderr); message != "" {
+ return message, nil
+ }
+ return ee.String(), nil
}
return "", err
}