|
|
@@ -15,6 +15,14 @@ done
|
|
|
# to avoid native module ABI mismatches (e.g., better-sqlite3 compiled for bun vs node)
|
|
|
DIR="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
|
|
|
|
|
|
+# Oivo installs the shared project index under /srv/.cache/qmd so spawned
|
|
|
+# agents, cron jobs, and shell calls all read the same database. The MCP preset
|
|
|
+# injects XDG_CACHE_HOME explicitly, but direct `qmd ...` calls do not; without
|
|
|
+# this default they silently create/read an empty ~/.cache/qmd/index.sqlite.
|
|
|
+if [ -z "${INDEX_PATH:-}" ] && [ -z "${XDG_CACHE_HOME:-}" ] && [ -d /srv/.cache/qmd ]; then
|
|
|
+ export XDG_CACHE_HOME=/srv/.cache
|
|
|
+fi
|
|
|
+
|
|
|
# Detect the package manager that installed dependencies by checking lockfiles.
|
|
|
# $BUN_INSTALL is intentionally NOT checked — it only indicates that bun exists
|
|
|
# on the system, not that it was used to install this package (see #361).
|