forked from drath/libratbag
lint: exit early if git ls-files doesn't find anything
This commit is contained in:
@@ -7,4 +7,10 @@ fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
ruff check --fix $(git ls-files "*.py" "*.py.in")
|
||||
files=$(git ls-files "*.py" "*.py.in")
|
||||
if [ -z "$files" ]; then
|
||||
echo "Git didn't find any files"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
ruff check --fix $files
|
||||
|
||||
Reference in New Issue
Block a user