Commit 9a7a9ae9 authored by Aleksey Midenkov's avatar Aleksey Midenkov

Scripts: capture_warnings.sh fix

parent 53d9e614
......@@ -7,8 +7,11 @@ warn_file="$warn_path/compile.warnings"
suppress_file="$warn_path/suppress.warnings"
exec 3>&1
cmderr=$("$@" 2>&1 1>&3)
error=$?
cmderr=$("$@" 2>&1 1>&3) || {
error=$?
echo "$cmderr" >&2
exit $error
}
if [[ -n "$cmderr" ]]; then
[[ "$warn_mode" != "late" ]] &&
......@@ -17,4 +20,5 @@ if [[ -n "$cmderr" ]]; then
echo -n "$cmderr" >> "$warn_file"
fi
exit ${error}
true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment