feat(settings): add LORA_MANAGER_PORTABLE env var for per-instance settings isolation (#1018)

This commit is contained in:
Will Miao
2026-07-12 07:43:21 +08:00
parent 4f016a8024
commit 71658ab37b
3 changed files with 65 additions and 1 deletions

View File

@@ -152,6 +152,9 @@ class SettingsManager:
self._check_environment_variables()
self._collect_configuration_warnings()
if os.environ.get("LORA_MANAGER_PORTABLE", "0") == "1":
self.settings.setdefault("use_portable_settings", True)
if self._needs_initial_save:
self._save_settings()
self._needs_initial_save = False