Skip to content

Commit 3dda044

Browse files
Build: Simplify 'suppress' helper now that Cadius is smarter
Following a recent Cadius change, it now returns an error code if the operation failed, so parsing the output to detect errors is no longer needed.
1 parent 48df1f6 commit 3dda044

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

bin/util.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,14 @@ function cecho {
1616

1717
# suppress - hide command output unless it failed; and if so show in red
1818
# ex: suppress command_that_might_fail args ...
19-
# Also looks for "Error" lines in stdout, those cause failure too.
2019
function suppress {
2120
set +e
22-
local result=$("$@")
21+
local result
22+
result=$("$@")
2323
if [ $? -ne 0 ]; then
2424
cecho red "$result" >&2
2525
exit 1
2626
fi
27-
while read line; do
28-
if [[ $line == *"Error"* ]]; then
29-
cecho red "$line" >&2
30-
exit 1
31-
fi
32-
done <<<"$result"
3327
set -e
3428
}
3529

0 commit comments

Comments
 (0)