From 25cad2596dd89b54a89f5d304f9f1ff4417db157 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 15 Mar 2018 12:49:10 +0100 Subject: [PATCH] chore(tools): do not deal with deleted files --- tools/check_qml_syntax | 2 +- tools/test_qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/check_qml_syntax b/tools/check_qml_syntax index b3cdee8ae..d8354aa97 100755 --- a/tools/check_qml_syntax +++ b/tools/check_qml_syntax @@ -36,7 +36,7 @@ while read file; do if [[ $? != 0 ]] ; then so_far_so_good=1 fi -done < <(git diff --name-only --cached | grep -E '\.qml|js|js\.spec$') +done < <(git diff --name-only --cached --diff-filter=d | grep -E '\.qml|js|js\.spec$') if [[ $so_far_so_good == 0 ]]; then printf "${GREEN}Done. No qml error found.\n" diff --git a/tools/test_qml b/tools/test_qml index 1a767b321..c286ffcd6 100755 --- a/tools/test_qml +++ b/tools/test_qml @@ -28,7 +28,7 @@ if ! [ -x "$( command -v "$TEST_RUNNER" )" ]; then exit 0 fi -git diff --name-only --cached | grep -Eq '\.qml|js|js\.spec$' +git diff --name-only --cached --diff-filter=d | grep -Eq '\.qml|js|js\.spec$' if [[ $? != 0 ]] ; then exit 0 fi