Skip to content

Commit d343175

Browse files
committed
Behat: Conditionally add xdebug flag
1 parent 8c5d2b6 commit d343175

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/reusable-testing.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ jobs:
421421
ARGS=()
422422
423423
if [[ $WP_CLI_TEST_COVERAGE == 'true' ]]; then
424-
ARGS+=("--xdebug")
424+
# The flag was only added in v3.17.0
425+
XDEBUG_FLAG=$(composer behat -- --help 2>/dev/null | grep xdebug)
426+
if [[ -n $XDEBUG_FLAG ]]; then
427+
ARGS+=("--xdebug")
428+
fi
425429
fi
426430
427431
if [[ $RUNNER_DEBUG == '1' ]]; then

0 commit comments

Comments
 (0)