From d6130394fa245d55cd2d75dab4c9744b58728540 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 30 Aug 2026 16:06:29 -0400 Subject: [PATCH] Default the suite's OMARCHY_PATH to the running session's tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run over SSH with no OMARCHY_PATH, the acceptance runner defaulted it to its own root — wrong in both sync modes omarchy-iso-test uses. With only test/ synced, the root has no shell or install manifests: omarchy-shell refuses every call and the package audit passes vacuously against an empty manifest. With a full tree synced, the path disagrees with the config path the session shell was started from, and since qs matches instances by that path, every omarchy-shell call reads as "not running". The suite acts on the running session, so ask the user manager for the session's own OMARCHY_PATH first, then fall back to this checkout, then to the installed tree. --- test/acceptance | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/acceptance b/test/acceptance index 192e38f0..37a63f6e 100755 --- a/test/acceptance +++ b/test/acceptance @@ -19,7 +19,22 @@ mkdir -p "$OMARCHY_ACCEPTANCE_DIR" # the session environment is inherited. export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}" export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=$XDG_RUNTIME_DIR/bus}" -export OMARCHY_PATH="${OMARCHY_PATH:-$ROOT}" +# The suite acts on the running session, and qs matches shell instances by +# config path — pointed at any other tree, every omarchy-shell call reads as +# "not running". So default OMARCHY_PATH to the tree the session was started +# from, then this checkout for standalone use, then the installed tree for +# when only test/ was synced in (omarchy-iso-test's --sync-omarchy). +if [[ -z ${OMARCHY_PATH:-} ]]; then + OMARCHY_PATH=$(systemctl --user show-environment 2>/dev/null | sed -n 's/^OMARCHY_PATH=//p' | tail -1) +fi +if [[ -z $OMARCHY_PATH ]]; then + OMARCHY_PATH=$ROOT +fi +if [[ ! -f $OMARCHY_PATH/shell/shell.qml && -f /usr/share/omarchy/shell/shell.qml ]]; then + OMARCHY_PATH=/usr/share/omarchy +fi +export OMARCHY_PATH + export PATH="$OMARCHY_PATH/bin:$PATH" if [[ -z ${DISPLAY:-} ]]; then