Skip to content

Commit d5584e7

Browse files
bertskystweil
authored andcommitted
fixed failure report for tesstrain commands:
- with `set -e` in effect, it does not make sense to query `$?` indirectly
1 parent 3912cb1 commit d5584e7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/training/tesstrain_utils.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ run_command() {
8383
fi
8484
shift
8585
tlog "[$(date)] ${cmd} $@"
86-
"${cmd}" "$@" 2>&1 1>&2 | tee -a ${LOG_FILE}
87-
# check completion status
88-
if [[ $? -gt 0 ]]; then
86+
if ! "${cmd}" "$@" 2>&1 1>&2 | tee -a ${LOG_FILE}; then
8987
err_exit "Program $(basename ${cmd}) failed. Abort."
9088
fi
9189
}

0 commit comments

Comments
 (0)