From 4d78e4fc29f623afc0ddc6905e9a086877efbe85 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 15 May 2018 13:55:22 +0200 Subject: [PATCH] fix(tools): avoid invalid check with git diff --- 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 6923de99e..008798dbe 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 --diff-filter=d | 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 8ffa6f82b..30b0a68b7 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 --diff-filter=d | 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