Rename GEMINI_CLI_NO_RELAUNCH to QWEN_CODE_NO_RELAUNCH

This commit is contained in:
Alexander Farber
2025-12-10 13:48:01 +01:00
parent 95d3e5b744
commit bf905dcc17
5 changed files with 13 additions and 13 deletions

View File

@@ -379,8 +379,8 @@ describe('gemini.tsx main function kitty protocol', () => {
beforeEach(() => { beforeEach(() => {
// Set no relaunch in tests since process spawning causing issues in tests // Set no relaunch in tests since process spawning causing issues in tests
originalEnvNoRelaunch = process.env['GEMINI_CLI_NO_RELAUNCH']; originalEnvNoRelaunch = process.env['QWEN_CODE_NO_RELAUNCH'];
process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true'; process.env['QWEN_CODE_NO_RELAUNCH'] = 'true';
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
if (!(process.stdin as any).setRawMode) { if (!(process.stdin as any).setRawMode) {
@@ -402,9 +402,9 @@ describe('gemini.tsx main function kitty protocol', () => {
afterEach(() => { afterEach(() => {
// Restore original env variables // Restore original env variables
if (originalEnvNoRelaunch !== undefined) { if (originalEnvNoRelaunch !== undefined) {
process.env['GEMINI_CLI_NO_RELAUNCH'] = originalEnvNoRelaunch; process.env['QWEN_CODE_NO_RELAUNCH'] = originalEnvNoRelaunch;
} else { } else {
delete process.env['GEMINI_CLI_NO_RELAUNCH']; delete process.env['QWEN_CODE_NO_RELAUNCH'];
} }
}); });

View File

@@ -92,7 +92,7 @@ function getNodeMemoryArgs(isDebugMode: boolean): string[] {
); );
} }
if (process.env['GEMINI_CLI_NO_RELAUNCH']) { if (process.env['QWEN_CODE_NO_RELAUNCH']) {
return []; return [];
} }

View File

@@ -115,7 +115,7 @@ describe('relaunchAppInChildProcess', () => {
vi.clearAllMocks(); vi.clearAllMocks();
process.env = { ...originalEnv }; process.env = { ...originalEnv };
delete process.env['GEMINI_CLI_NO_RELAUNCH']; delete process.env['QWEN_CODE_NO_RELAUNCH'];
process.execArgv = [...originalExecArgv]; process.execArgv = [...originalExecArgv];
process.argv = [...originalArgv]; process.argv = [...originalArgv];
@@ -145,9 +145,9 @@ describe('relaunchAppInChildProcess', () => {
stdinResumeSpy.mockRestore(); stdinResumeSpy.mockRestore();
}); });
describe('when GEMINI_CLI_NO_RELAUNCH is set', () => { describe('when QWEN_CODE_NO_RELAUNCH is set', () => {
it('should return early without spawning a child process', async () => { it('should return early without spawning a child process', async () => {
process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true'; process.env['QWEN_CODE_NO_RELAUNCH'] = 'true';
await relaunchAppInChildProcess(['--test'], ['--verbose']); await relaunchAppInChildProcess(['--test'], ['--verbose']);
@@ -156,9 +156,9 @@ describe('relaunchAppInChildProcess', () => {
}); });
}); });
describe('when GEMINI_CLI_NO_RELAUNCH is not set', () => { describe('when QWEN_CODE_NO_RELAUNCH is not set', () => {
beforeEach(() => { beforeEach(() => {
delete process.env['GEMINI_CLI_NO_RELAUNCH']; delete process.env['QWEN_CODE_NO_RELAUNCH'];
}); });
it('should construct correct node arguments from execArgv, additionalNodeArgs, script, additionalScriptArgs, and argv', () => { it('should construct correct node arguments from execArgv, additionalNodeArgs, script, additionalScriptArgs, and argv', () => {

View File

@@ -27,7 +27,7 @@ export async function relaunchAppInChildProcess(
additionalNodeArgs: string[], additionalNodeArgs: string[],
additionalScriptArgs: string[], additionalScriptArgs: string[],
) { ) {
if (process.env['GEMINI_CLI_NO_RELAUNCH']) { if (process.env['QWEN_CODE_NO_RELAUNCH']) {
return; return;
} }
@@ -44,7 +44,7 @@ export async function relaunchAppInChildProcess(
...additionalScriptArgs, ...additionalScriptArgs,
...scriptArgs, ...scriptArgs,
]; ];
const newEnv = { ...process.env, GEMINI_CLI_NO_RELAUNCH: 'true' }; const newEnv = { ...process.env, QWEN_CODE_NO_RELAUNCH: 'true' };
// The parent process should not be reading from stdin while the child is running. // The parent process should not be reading from stdin while the child is running.
process.stdin.pause(); process.stdin.pause();

View File

@@ -67,7 +67,7 @@ const env = {
if (process.env.DEBUG) { if (process.env.DEBUG) {
// If this is not set, the debugger will pause on the outer process rather // If this is not set, the debugger will pause on the outer process rather
// than the relaunched process making it harder to debug. // than the relaunched process making it harder to debug.
env.GEMINI_CLI_NO_RELAUNCH = 'true'; env.QWEN_CODE_NO_RELAUNCH = 'true';
} }
// Use process.cwd() to inherit the working directory from launch.json cwd setting // Use process.cwd() to inherit the working directory from launch.json cwd setting
// This allows debugging from a specific directory (e.g., .todo) // This allows debugging from a specific directory (e.g., .todo)