fix: restore interactive OpenAI REPL startup

This commit is contained in:
Kevin
2026-04-01 05:16:40 +08:00
parent 651335f682
commit 747be9c2f3
11 changed files with 61 additions and 47 deletions

View File

@@ -832,6 +832,14 @@ export function saveGlobalConfig(
writeThroughGlobalConfigCache(written)
}
} catch (error) {
const code = getErrnoCode(error)
if (code === 'EACCES' || code === 'EPERM' || code === 'EROFS') {
logForDebugging(
`Skipping global config write due to permission error: ${error}`,
{ level: 'error' },
)
return
}
logForDebugging(`Failed to save config with lock: ${error}`, {
level: 'error',
})