Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

fix(common): localauth finds ~/.xerj admin.key via home::home_dir

xerj-org9e81ea49b3c0
diff --git a/engine/crates/xerj-common/src/localauth.rs b/engine/crates/xerj-common/src/localauth.rs
index 4f1635546..5704f1fa1 100644
--- a/engine/crates/xerj-common/src/localauth.rs
+++ b/engine/crates/xerj-common/src/localauth.rs
@@ -88,9 +88,9 @@ pub fn discover_local_admin_key() -> Option<(String, PathBuf)> {
}
})
.collect();
- if let Some(home) = std::env::var_os("HOME") {
- paths.push(PathBuf::from(&home).join(".xerj/brain/admin.key"));
- paths.push(PathBuf::from(&home).join(".xerj/admin.key"));
+ if let Some(home) = crate::home::home_dir() {
+ paths.push(home.join(".xerj/brain/admin.key"));
+ paths.push(home.join(".xerj/admin.key"));
}
paths.into_iter().find_map(|p| {
std::fs::read_to_string(&p)