feat: support GITNEXUS_HOME env var to customize global directory (#746)

This commit is contained in:
evolution 2026-04-09 13:18:17 +08:00 • committed by GitHub
parent fd67cfd5a7
commit 9f9bbcd744
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,7 @@ export const addToGitignore = async (repoPath: string): Promise<void> => {
* 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');
};
/**