瀏覽代碼

use rev-parse

Vicente Canales 1 年之前
父節點
當前提交
4e199578ad
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      .github/workflows/add-strict-types.yml

+ 1 - 1
.github/workflows/add-strict-types.yml

@@ -21,7 +21,7 @@ jobs:
       - name: Checking for new PHP files
         id: check
         run: |
-          if [[ $(git diff --name-only HEAD^ HEAD | grep -E "\.php$") ]]; then
+          if [[ $(git rev-parse --verify HEAD^) ]]; then
             if [[ $(git diff --name-only HEAD^ HEAD | grep -E "\.php$" | xargs grep -L "declare\(strict_types=1\)" | wc -l) -gt 0 ]]; then
               echo "::set-output name=strict_types::false"
             else