diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6601baf..e3db515 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -25,10 +25,9 @@ jobs: echo "📝 PHP 语法检查..." errors=0 for file in $(find . -name "*.php" -not -path "./vendor/*"); do - output=$(php -l "$file" 2>&1) - if [ $? -ne 0 ]; then - echo "错误: $file" - echo "$output" + if ! php -l "$file" > /dev/null 2>&1; then + echo "❌ 语法错误: $file" + php -l "$file" || true errors=$((errors + 1)) fi done diff --git a/index.php b/index.php index f9494d8..effd874 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@