From d178b8da910d246b7c8e85711f820985efe7e086 Mon Sep 17 00:00:00 2001 From: tracer Date: Sun, 15 Feb 2026 23:37:48 +0100 Subject: [PATCH] make the update more verbose for testing --- git_update.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/git_update.sh b/git_update.sh index ce1c37d..456a025 100755 --- a/git_update.sh +++ b/git_update.sh @@ -90,7 +90,7 @@ resolve_configured_php_bin() { read_setting_php_bin() { if [[ ! -f artisan ]]; then echo "" - return + return 0 fi echo "Running with PHP binary: $PHP_BIN -r " >&2 "$PHP_BIN" -r ' @@ -99,7 +99,7 @@ $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $value = (string) \App\Models\Setting::where("key", "system.php_binary")->value("value"); echo trim($value); -' 2>/dev/null || true +' } PHP_BIN="$(resolve_php_bin)" @@ -119,7 +119,12 @@ fi echo "Running with PHP binary: $PHP_BIN $COMPOSER_BIN install --no-dev --optimize-autoloader" "$PHP_BIN" "$COMPOSER_BIN" install --no-dev --optimize-autoloader -CONFIGURED_PHP="$(read_setting_php_bin)" +if ! CONFIGURED_PHP="$(read_setting_php_bin)"; then + echo "Failed to read configured PHP binary from settings." >&2 + echo "Aborting to avoid running update with the wrong PHP binary." >&2 + exit 1 +fi +echo "Configured PHP binary from settings: ${CONFIGURED_PHP:-}" PHP_BIN="$(resolve_configured_php_bin "$CONFIGURED_PHP" "$PHP_BIN")" echo "Final PHP binary: $PHP_BIN"