Browse Source

use rev-parse

Vicente Canales 1 year ago
parent
commit
4e199578ad
1 changed files with 1 additions and 1 deletions
  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
       - name: Checking for new PHP files
         id: check
         id: check
         run: |
         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
             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"
               echo "::set-output name=strict_types::false"
             else
             else