run-linters: avoid searching scripts in build/

During package build the Python code is copied to the `build` directory.
Ignore this directory when searching for Python scripts.
This commit is contained in:
Benjamin Drung 2025-12-03 14:51:51 +01:00
parent 38ef3c506e
commit 32530e356d

View File

@ -4,7 +4,7 @@ set -eu
# Copyright 2023, Canonical Ltd.
# SPDX-License-Identifier: GPL-3.0
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
PYTHON_SCRIPTS=$(find . -maxdepth 1 -type f -exec grep -l '^#! */usr/bin/python3$' {} +)
run_black() {
echo "Running black..."