mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Fix infinite loop in start.js on Windows (#3506)
This commit is contained in:
@@ -48,7 +48,7 @@ if (!geminiSandbox) {
|
||||
|
||||
if (!geminiSandbox) {
|
||||
let currentDir = process.cwd();
|
||||
while (currentDir !== '/') {
|
||||
while (true) {
|
||||
const geminiEnv = join(currentDir, '.gemini', '.env');
|
||||
const regularEnv = join(currentDir, '.env');
|
||||
if (existsSync(geminiEnv)) {
|
||||
@@ -58,7 +58,11 @@ if (!geminiSandbox) {
|
||||
dotenv.config({ path: regularEnv, quiet: true });
|
||||
break;
|
||||
}
|
||||
currentDir = dirname(currentDir);
|
||||
const parentDir = dirname(currentDir);
|
||||
if (parentDir === currentDir) {
|
||||
break;
|
||||
}
|
||||
currentDir = parentDir;
|
||||
}
|
||||
geminiSandbox = process.env.GEMINI_SANDBOX;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user