From 82fba2bdb22fe55ea74cf3b85c6e9f1ba0ba8223 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Sun, 24 Oct 2021 00:05:02 -0700 Subject: [PATCH] ci/apkbuild-linting: quit if there are no apkbuilds to lint (MR 2630) If the only changed apkbuilds are skipped, then the check would lint *every* apkbuild in aports (calling '-q lint' with no packages apparently causes it to do everything) This quits if all packages were skipped. It fixes the CI failure seen on MR !2600 --- .ci/apkbuild-linting.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.ci/apkbuild-linting.py b/.ci/apkbuild-linting.py index 62971f2b0..144068b3a 100755 --- a/.ci/apkbuild-linting.py +++ b/.ci/apkbuild-linting.py @@ -19,6 +19,9 @@ if __name__ == "__main__": print(f"NOTE: Skipping linting of {apkbuild}") continue packages.append(os.path.basename(os.path.dirname(apkbuild))) + if len(packages) < 1: + print("No APKBUILDs to lint") + sys.exit(0) result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)