fix: ensure Z.AI config directory exists before writing
Some checks failed
Release Binaries / release (push) Has been cancelled

This commit is contained in:
Gemini AI
2025-12-28 12:30:45 +04:00
Unverified
parent 0d3de9efa7
commit 2ac7eb12ce

View File

@@ -361,6 +361,10 @@ function getZAIConfig(): ZAIConfig {
}
function updateZAIConfig(config: Partial<ZAIConfig>): void {
// Ensure directory exists
if (!existsSync(CONFIG_DIR)) {
mkdirSync(CONFIG_DIR, { recursive: true })
}
const current = getZAIConfig()
const updated = { ...current, ...config }
writeFileSync(CONFIG_FILE, JSON.stringify(updated, null, 2))