Skip to content

Commit 429d34c

Browse files
committed
fix: pipefail explode
1 parent 5fcbb57 commit 429d34c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

bin/xdebug-set-mode

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ echo "zend_extension=xdebug.so" | tee -a $ini_file
3232
echo "xdebug.mode=$MODE" | tee -a $ini_file
3333
echo "xdebug.var_display_max_depth=5" | tee -a $ini_file
3434

35-
[[ $MODE =~ "debug" ]] && {
36-
echo "xdebug.idekey=${XDEBUG_IDEKEY}" | tee -a $ini_file
35+
[[ ! $MODE =~ "debug" ]] && exit
3736

38-
client_port=${XDEBUG_REMOTE_PORT:-${XDEBUG_CLIENT_PORT:-9003}}
39-
echo "xdebug.client_port=$client_port" | tee -a $ini_file
37+
echo "xdebug.idekey=${XDEBUG_IDEKEY}" | tee -a $ini_file
4038

41-
autostart="no"
42-
[[ ${XDEBUG_AUTOSTART} == true ]] && autostart="yes"
43-
echo "xdebug.start_with_request=$autostart" | tee -a $ini_file
39+
client_port=${XDEBUG_REMOTE_PORT:-${XDEBUG_CLIENT_PORT:-9003}}
40+
echo "xdebug.client_port=$client_port" | tee -a $ini_file
4441

45-
back="0"
46-
[[ ${XDEBUG_CONNECT_BACK} == true ]] && back="1"
47-
echo "xdebug.discover_client_host=$back" | tee -a $ini_file
48-
}
42+
autostart="no"
43+
[[ ${XDEBUG_AUTOSTART} == true ]] && autostart="yes"
44+
echo "xdebug.start_with_request=$autostart" | tee -a $ini_file
45+
46+
back="0"
47+
[[ ${XDEBUG_CONNECT_BACK} == true ]] && back="1"
48+
echo "xdebug.discover_client_host=$back" | tee -a $ini_file

0 commit comments

Comments
 (0)