From 32530e356d55d90f341be00b3d96b795e84a8cf4 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 3 Dec 2025 14:51:51 +0100 Subject: [PATCH] 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. --- run-linters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-linters b/run-linters index edb71bb..17dd478 100755 --- a/run-linters +++ b/run-linters @@ -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..."