From 2820329a9689b30ac625c3f06f7e223c4fb039e8 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 3 Dec 2025 21:22:15 -0500 Subject: [PATCH] fix: improve opcache reset command in Laravel cache script for better compatibility --- laravalcache.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravalcache.sh b/laravalcache.sh index 1d8c809fd..461ee6d35 100755 --- a/laravalcache.sh +++ b/laravalcache.sh @@ -24,7 +24,7 @@ COMMANDS=( "php artisan package:discover --ansi" "php artisan optimize" "pkill -f 'artisan queue:work' >/dev/null 2>&1 || true; nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 &" - "php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();' 2>/dev/null || true" + "(command -v php >/dev/null 2>&1 && php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();') || true" ) draw_bar() {