diff options
Diffstat (limited to 'util/lint/lint-014-qualified-types')
-rwxr-xr-x | util/lint/lint-014-qualified-types | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/lint/lint-014-qualified-types b/util/lint/lint-014-qualified-types index 58b48b705e..98679ea55e 100755 --- a/util/lint/lint-014-qualified-types +++ b/util/lint/lint-014-qualified-types @@ -21,7 +21,9 @@ EXCLUDED_DIRS='^src/vendorcode\|^util/romcc\|cbfstool/lzma\|cbfstool/lz4' INCLUDED_FILES='\.[ch]:' # Use git grep if the code is in a git repo, otherwise use grep. -if [ -n "$(command -v git)" ] && [ -d .git ]; then +if [ -n "$(command -v git)" ] && \ + [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] +then GREP_FILES="git grep -n" else GREP_FILES="grep -rn" |