diff --git a/backend/src/utils/modelRegistryStore.ts b/backend/src/utils/modelRegistryStore.ts index 6458efb..5ba9435 100644 --- a/backend/src/utils/modelRegistryStore.ts +++ b/backend/src/utils/modelRegistryStore.ts @@ -302,7 +302,8 @@ function writeProfileRegistry(registry: ModelRegistry): void { const profilePath = getModelRegistryPath(); fs.mkdirSync(path.dirname(profilePath), { recursive: true }); fs.writeFileSync(`${profilePath}.tmp`, `${JSON.stringify(registry, null, 2)}\n`, "utf-8"); - fs.renameSync(`${profilePath}.tmp`, profilePath); + fs.copyFileSync(`${profilePath}.tmp`, profilePath); + fs.unlinkSync(`${profilePath}.tmp`); } function registryFromEnvJson(env: Record): ModelRegistry {