From ededb5980198a783d0cbcf1c08edecc8ef12326e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 10 Apr 2024 22:56:26 -0700 Subject: [PATCH] build/bin/sage-logger: Suppress error message output when /usr/bin/time is not available --- build/bin/sage-logger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bin/sage-logger b/build/bin/sage-logger index 6945ba98182..1661e52f5f8 100755 --- a/build/bin/sage-logger +++ b/build/bin/sage-logger @@ -63,7 +63,7 @@ fi timefile="$logdir/$logname.time" rm -f "$timefile" -if /usr/bin/time -h -o /dev/null true; then +if /usr/bin/time -h -o /dev/null true 2>/dev/null; then TIME="/usr/bin/time -h -o $timefile" else TIME="" @@ -71,7 +71,7 @@ fi report_time () { - time=$(echo $(cat $timefile)) + time=$(echo $(cat $timefile 2>/dev/null)) case "$time" in *m*real*|*h*real*|*[1-9][0-9].*real*|*[1-9][0-9],*real*) # at least 10 seconds wall time