fix(installer): delegate fresh-install defaults to reset_settings while guarding existing config

This commit is contained in:
Dushnilin
2026-09-09 13:45:31 +03:00
parent 695a2bfe36
commit c0d24ddae9
2 changed files with 15 additions and 3 deletions
+10
View File
@@ -1507,6 +1507,16 @@ function installer_post_install() {
warn("Failed to start Tachyon after upgrade.\n");
}
// Fresh installs must end up in a pristine default state: wipe leftover
// caches and runtime state from previous installations and rewrite the
// config from the bundled default. Upgrades and legacy migrations keep
// the user configuration untouched.
if (env("TACHYON_WAS_INSTALLED", "0") != "1" &&
env("TACHYON_LEGACY_DETECTED", "0") != "1") {
if (!run_args([ "timeout", "60", INSTALLER_TACHYON_BIN, "reset_settings", "no-start" ]))
warn("Failed to reset Tachyon settings to defaults after a fresh install.\n");
}
return true;
}