Introduce GEMINI_CLI_HOME for strict test isolation (#15907)

This commit is contained in:
N. Taylor Mullen
2026-01-06 20:09:39 -08:00
committed by GitHub
parent a26463b056
commit 7956eb239e
54 changed files with 455 additions and 148 deletions

View File

@@ -33,10 +33,12 @@ const argv = yargs(hideBin(process.argv)).option('q', {
default: false,
}).argv;
const homedir = () => process.env['GEMINI_CLI_HOME'] || os.homedir();
let geminiSandbox = process.env.GEMINI_SANDBOX;
if (!geminiSandbox) {
const userSettingsFile = join(os.homedir(), GEMINI_DIR, 'settings.json');
const userSettingsFile = join(homedir(), GEMINI_DIR, 'settings.json');
if (existsSync(userSettingsFile)) {
const settings = JSON.parse(
stripJsonComments(readFileSync(userSettingsFile, 'utf-8')),