changeset 627:b1e26b956041

common.subr: FIX: err() and fatal() now really out their output to stderr. It was documented to output to stderr, but really the output went to stdout.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 24 Sep 2024 18:20:30 +0200
parents be8dce486af6
children 17209ce80536
files share/local-bsdtools/common.subr
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/share/local-bsdtools/common.subr	Tue Sep 24 18:17:50 2024 +0200
+++ b/share/local-bsdtools/common.subr	Tue Sep 24 18:20:30 2024 +0200
@@ -37,7 +37,7 @@
     else
         _ec=1
     fi
-    printf "%s: ERROR: %s\\n" "$0" "$*"
+    printf "%s: ERROR: %s\\n" "$0" "$*" 1>&2
     exit "${_ec}"
 }
 
@@ -54,7 +54,7 @@
 #: The name of the script is prepended to the error message always.
 #:
 err() {
-    printf "%s: ERROR: %s\\n" "$0" "$*"
+    printf "%s: ERROR: %s\\n" "$0" "$*" 1>&2
     return 0
 }