Default the suite's OMARCHY_PATH to the running session's tree

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.
This commit is contained in:
Ryan Hughes
2026-08-30 16:30:45 -04:00
parent e1fc502286
commit d6130394fa
+16 -1
View File
@@ -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