diff options
author | catch <catch@35733.no-reply.drupal.org> | 2022-01-18 19:00:42 +0000 |
---|---|---|
committer | catch <catch@35733.no-reply.drupal.org> | 2022-01-18 19:00:42 +0000 |
commit | 3a2115b6c31167ba76d3766623c9f51cb4cbed3d (patch) | |
tree | bcb7001fee23515927e5c04d80a4c8474d0a30f1 /core/scripts/dev/commit-code-check.sh | |
parent | 45d838fcb742e22f4e8ec24d16ec3eab79732339 (diff) | |
download | drupal-3a2115b6c31167ba76d3766623c9f51cb4cbed3d.tar.gz drupal-3a2115b6c31167ba76d3766623c9f51cb4cbed3d.zip |
Issue #3259142 by longwave, murilohp: PHPStan commit check fails if a file is deleted
Diffstat (limited to 'core/scripts/dev/commit-code-check.sh')
-rwxr-xr-x | core/scripts/dev/commit-code-check.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh index 9660d8084b2b..869172b919fd 100755 --- a/core/scripts/dev/commit-code-check.sh +++ b/core/scripts/dev/commit-code-check.sh @@ -125,7 +125,9 @@ ESLINT_CONFIG_PASSING_FILE_CHANGED=0 # Build up a list of absolute file names. ABS_FILES= for FILE in $FILES; do - ABS_FILES="$ABS_FILES $TOP_LEVEL/$FILE" + if [ -f "$TOP_LEVEL/$FILE" ]; then + ABS_FILES="$ABS_FILES $TOP_LEVEL/$FILE" + fi if [[ $FILE == "core/phpcs.xml.dist" ]]; then PHPCS_XML_DIST_FILE_CHANGED=1; |