Skip to content

Commit 19a098a

Browse files
committed
tests: enable debugging via BASH_XTRACEFD only if bash is new enough
1 parent ddd03dd commit 19a098a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/queries/shell_config.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ function run_with_error()
214214
return 0
215215
}
216216

217-
if [[ -n $CLICKHOUSE_BASH_TRACING_FILE ]]; then
217+
# BASH_XTRACEFD is supported only since 4.1
218+
if [[ -n $CLICKHOUSE_BASH_TRACING_FILE ]] && [[ ${BASH_VERSINFO[0]} -gt 4 || (${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -ge 1) ]]; then
218219
exec 3>"$CLICKHOUSE_BASH_TRACING_FILE"
219220
# It will be also nice to have stderr in the tracing output, but:
220221
# - exec 2>&3

0 commit comments

Comments
 (0)