mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-06 02:49:56 +00:00
fix(embeddings): resolve server-mapping path for parity with clone/upload roots
MAPPING_FILE now wraps path.resolve() like CLONE_ROOT (git-clone.ts) and UPLOAD_ROOT (upload-paths.ts), so a relative GITNEXUS_HOME yields an absolute path. No-op for the supported absolute-GITNEXUS_HOME config (Docker) and for readServerMapping's only caller (run-analyze.ts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5c68d96d66
commit
d07c63fdf9
1 changed files with 4 additions and 2 deletions
|
|
@ -10,8 +10,10 @@ import path from 'path';
|
|||
import { getGlobalDir } from '../../storage/repo-manager.js';
|
||||
|
||||
// Sourced from getGlobalDir() so it honors GITNEXUS_HOME (the Docker image sets
|
||||
// GITNEXUS_HOME=/data/gitnexus); falls back to ~/.gitnexus when unset.
|
||||
const MAPPING_FILE = path.join(getGlobalDir(), 'server-mapping.json');
|
||||
// GITNEXUS_HOME=/data/gitnexus); falls back to ~/.gitnexus when unset. Wrapped in
|
||||
// path.resolve() for parity with the clone/upload roots (git-clone.ts CLONE_ROOT,
|
||||
// upload-paths.ts UPLOAD_ROOT) so a relative GITNEXUS_HOME still yields an absolute path.
|
||||
const MAPPING_FILE = path.resolve(path.join(getGlobalDir(), 'server-mapping.json'));
|
||||
|
||||
let cachedMapping: Record<string, string> | null = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue