From f375113fe32ad9d11435623c106f64127d89c742 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 26 Jul 2026 14:27:50 -0700 Subject: [PATCH] Find the omarchy-pkgs checkout for PKGBUILD coverage The three hardcoded candidates are all relative to a sibling of the omarchy checkout, so a clone anywhere else, such as ~/Work/omacom/omarchy-pkgs, found nothing. The block then crashed on read_text() and the whole test exited on an unhandled traceback, which reads as an unrelated failure rather than a missing checkout. Add the omacom layouts, an OMARCHY_PKGS_PATH override taking either the checkout or its pkgbuilds directory, and a named failure listing where it looked. Co-Authored-By: Claude Opus 5 (1M context) --- test/shell.d/config-test.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test/shell.d/config-test.sh b/test/shell.d/config-test.sh index ed1d7480..65968e90 100755 --- a/test/shell.d/config-test.sh +++ b/test/shell.d/config-test.sh @@ -94,12 +94,29 @@ import sys from pathlib import Path root = Path(os.environ["ROOT"]) +home = Path.home() pkgs_candidates = [ root.parent / "omarchy-pkgs/pkgbuilds", root.parent / "omarchy/omarchy-pkgs/pkgbuilds", root.parent.parent / "omarchy-pkgs/pkgbuilds", + root.parent / "omacom/omarchy-pkgs/pkgbuilds", + root.parent.parent / "omacom/omarchy-pkgs/pkgbuilds", + home / "Work/omacom/omarchy-pkgs/pkgbuilds", ] -pkgs_root = next((path for path in pkgs_candidates if path.exists()), pkgs_candidates[0]) +# Checkouts differ per machine, so allow an explicit pointer at the sibling repo. +# Accepts either the omarchy-pkgs checkout or its pkgbuilds/ directory. +override = os.environ.get("OMARCHY_PKGS_PATH") +if override: + pkgs_candidates = [Path(override) / "pkgbuilds", Path(override)] + pkgs_candidates +pkgs_root = next((path for path in pkgs_candidates if path.exists()), None) +if pkgs_root is None: + print("not ok - omarchy-pkgs checkout found for PKGBUILD coverage", file=sys.stderr) + print( + "looked in:\n " + "\n ".join(str(path) for path in pkgs_candidates) + + "\nset OMARCHY_PKGS_PATH to the omarchy-pkgs checkout", + file=sys.stderr, + ) + sys.exit(1) settings_pkgbuild_path = pkgs_root / "omarchy-settings/PKGBUILD" omarchy_pkgbuild_path = pkgs_root / "omarchy/PKGBUILD" if not settings_pkgbuild_path.exists():