mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-09 19:45:41 +00:00
Update init.ts
This commit is contained in:
parent
13e031b03d
commit
c8b92bd281
1 changed files with 11 additions and 0 deletions
|
|
@ -225,6 +225,17 @@ export async function startBackend(setPort?: (port: number) => void): Promise<an
|
|||
log.warn(`Failed to remove lock file: ${e}`);
|
||||
}
|
||||
|
||||
// Cleanup corrupted python cache
|
||||
try {
|
||||
const pythonCacheDir = getCachePath('uv_python');
|
||||
if (fs.existsSync(pythonCacheDir)) {
|
||||
log.info(`Removing potentially corrupted Python cache: ${pythonCacheDir}`);
|
||||
fs.rmSync(pythonCacheDir, { recursive: true, force: true });
|
||||
}
|
||||
} catch (e) {
|
||||
log.warn(`Failed to remove Python cache: ${e}`);
|
||||
}
|
||||
|
||||
// Use proxy if in China (simple check based on timezone)
|
||||
// Add official PyPI as fallback for packages not available on mirror
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue