From 4b55a3e5256812e5555c2d4f1702cf11f380c31f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 14 May 2022 23:52:37 +0800 Subject: [PATCH] add $ZM_CUSTOM_PHP_PATH env support --- bin/start | 5 ++++- zhamao | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/start b/bin/start index d2f111be..c3eb7aaf 100755 --- a/bin/start +++ b/bin/start @@ -5,7 +5,10 @@ # author: crazywhalecc # since: 2.5.0 -if [ -f "$(pwd)/runtime/php" ]; then +if [ "$ZM_CUSTOM_PHP_PATH" != "" ]; then + echo "* Using PHP executable: ""$ZM_CUSTOM_PHP_PATH" + executable="$ZM_CUSTOM_PHP_PATH" +elif [ -f "$(pwd)/runtime/php" ]; then executable="$(pwd)/runtime/php" echo "* Framework started with built-in php." else diff --git a/zhamao b/zhamao index f8581dbd..c3eb7aaf 100755 --- a/zhamao +++ b/zhamao @@ -5,8 +5,10 @@ # author: crazywhalecc # since: 2.5.0 - -if [ -f "$(pwd)/runtime/php" ]; then +if [ "$ZM_CUSTOM_PHP_PATH" != "" ]; then + echo "* Using PHP executable: ""$ZM_CUSTOM_PHP_PATH" + executable="$ZM_CUSTOM_PHP_PATH" +elif [ -f "$(pwd)/runtime/php" ]; then executable="$(pwd)/runtime/php" echo "* Framework started with built-in php." else