diff options
Diffstat (limited to '.githooks/pre-commit.shellcheck')
-rwxr-xr-x | .githooks/pre-commit.shellcheck | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.githooks/pre-commit.shellcheck b/.githooks/pre-commit.shellcheck index 7615d44..f218922 100755 --- a/.githooks/pre-commit.shellcheck +++ b/.githooks/pre-commit.shellcheck @@ -22,6 +22,11 @@ fi success=${TRUE} for f in $(git diff --cached --name-only); do + # Check for file deletion. + if [ ! -r "${f}" ]; then + continue + fi + cmd=':' case "${f}" in shflags|shflags_test_helpers) cmd="shellcheck -s sh ${f}" ;; |