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() {