File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ for i in ./build/*/; do
3434 echo " ${text_bold} * Building ${image} ${text_normal} "
3535
3636 # Builds image and check for return code
37- if [ " $( docker build --pull -t " ${image} " " ./build/${version} " ) " -eq 0 ] ; then
37+ if ! docker build --pull -t " ${image} " " ./build/${version} " ; then
3838 echo " ${text_bold}${text_red} * ERROR when building ${image} ${text_normal} "
3939 exit 1
4040 fi
@@ -46,7 +46,5 @@ for i in ./build/*/; do
4646 --workdir /app \
4747 --entrypoint php \
4848 " ${image} " test-xdebug-install.php
49-
50- exit 0
5149done
5250
Original file line number Diff line number Diff line change 1- #! /usr/bin/env sh
1+ #! /usr/bin/env bash
22
3- if [ -n " $( git status --porcelain --untracked-files=no) " ]; then
3+ if [[ -n $( git status --porcelain --untracked-files=no) ] ]; then
44 exit 1
55fi
Original file line number Diff line number Diff line change 11<?php
22
3- function testPhpinfo () {
4- ob_start ();
5- phpinfo ( );
6- $ phpinfo = ob_get_flush ();
3+ function checkExtensionLoaded () {
4+ if (! extension_loaded ( ' xdebug ' )) {
5+ exit ( 1 );
6+ }
77}
88
9- function testVardump () {
10-
11- }
12-
13- function testXdebugIsDebuggerActive () {
14- // xdebug_is_debugger_active
15- // https://xdebug.org/docs/all_functions#xdebug_is_debugger_active
9+ function checkXdebugIsDebuggerActive () {
10+ if (!function_exists ('xdebug_is_debugger_active ' )) {
11+ exit (1 );
12+ }
13+ $ result = xdebug_is_debugger_active ();
14+ if (!is_bool ($ result )) {
15+ exit (1 );
16+ }
1617}
1718
18-
19-
20-
21- // https://stackoverflow.com/questions/14046501/check-if-xdebug-is-working
19+ checkExtensionLoaded ();
20+ checkXdebugIsDebuggerActive ();
You can’t perform that action at this time.
0 commit comments