From 9f9bbcd74495e0a57bc33865229a66331cf82cc5 Mon Sep 17 00:00:00 2001 From: evolution Date: Thu, 9 Apr 2026 13:18:17 +0800 Subject: [PATCH] feat: support GITNEXUS_HOME env var to customize global directory (#746) --- gitnexus/src/storage/repo-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitnexus/src/storage/repo-manager.ts b/gitnexus/src/storage/repo-manager.ts index cc447aa4c..b233d44fb 100644 --- a/gitnexus/src/storage/repo-manager.ts +++ b/gitnexus/src/storage/repo-manager.ts @@ -212,7 +212,7 @@ export const addToGitignore = async (repoPath: string): Promise => { * Get the path to the global GitNexus directory */ export const getGlobalDir = (): string => { - return path.join(os.homedir(), '.gitnexus'); + return process.env.GITNEXUS_HOME || path.join(os.homedir(), '.gitnexus'); }; /**