diff options
author | Ed Tanous <edtanous@google.com> | 2021-09-20 21:11:34 +0300 |
---|---|---|
committer | Ed Tanous <edtanous@google.com> | 2021-09-20 21:13:37 +0300 |
commit | 4734c22edc654522fad23b82a66a140b46a29266 (patch) | |
tree | ed48806e11b573f047760be544d1a8771d76f4a5 | |
parent | a1c4992329abce1be29c5d20c36dc3dc52f6b90f (diff) | |
download | openbmc-4734c22edc654522fad23b82a66a140b46a29266.tar.xz |
Ignore grep failures
When the last round of reviews added -e to the bash statement, it
exposed a slight flaw, in that when there aren't failures, grep will
return a code if it's not able to find any matches.
This commit changes that such that grep errors are "ignored" in the
context of bash.
Tested:
ran run-repotest.sh on a clean repository, and observed "repo test
passed"
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I716220652d48b9a8489bf4dc0c3b4734b98a70e4
-rwxr-xr-x | meta-phosphor/scripts/run-repotest.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-phosphor/scripts/run-repotest.sh b/meta-phosphor/scripts/run-repotest.sh index 88501b20f..bd82176d3 100755 --- a/meta-phosphor/scripts/run-repotest.sh +++ b/meta-phosphor/scripts/run-repotest.sh @@ -73,7 +73,7 @@ files_diff=$(comm -23 $patch_files_tmp $allowed_patches_tmp) rm $allowed_patches_tmp rm $patch_files_tmp -files_count=$(echo -n "$files_diff" | grep -c '^') +files_count=$(echo -n "$files_diff" | grep -c '^' || true) if [[ $files_count -ne 0 ]]; then echo "Patch files found not in allow list" echo "$files_diff" |