From 1801dc8825385da0f0db58a14baaa1aa396c6d2b Mon Sep 17 00:00:00 2001 From: ironex Date: Tue, 3 Aug 2021 11:08:56 +0200 Subject: [PATCH] Fix Xdebug command for Linux --- bin/xdebug | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/xdebug b/bin/xdebug index 7f86268..8a1f88e 100755 --- a/bin/xdebug +++ b/bin/xdebug @@ -27,6 +27,11 @@ # trace # - Enables the Function Trace feature, which allows you record every function call, including arguments, variable assignment, and return value that is made during a request to a file. -sed -i '' "s/xdebug.mode=.*/xdebug.mode=$1/g" docker/php-fpm/php.ini +if [ $(uname) == "Darwin" ] +then + sed -i '' "s/xdebug.mode=.*/xdebug.mode=$1/g" docker/php-fpm/php.ini +else + sed -i "s/xdebug.mode=.*/xdebug.mode=$1/g" docker/php-fpm/php.ini +fi docker-compose restart php-fpm \ No newline at end of file