Report configuration persistence failures

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-10 11:25:08 -04:00
committed by Brandon McGinty
parent 655a109ce8
commit ef8a92149d
3 changed files with 27 additions and 12 deletions
+8 -2
View File
@@ -253,13 +253,19 @@ func main() {
b.Config.DisableUDP = *tcpOnly
b.Hotkeys = b.UserConfig.GetHotkeys()
b.UserConfig.SaveConfig()
if err := b.UserConfig.SaveConfig(); err != nil {
fmt.Fprintf(os.Stderr, "could not save configuration: %s\n", err)
os.Exit(1)
}
// Configure noise suppression
enabled := b.UserConfig.GetNoiseSuppressionEnabled()
if *noiseSuppressionEnabled {
enabled = true
b.UserConfig.SetNoiseSuppressionEnabled(true)
if err := b.UserConfig.SetNoiseSuppressionEnabled(true); err != nil {
fmt.Fprintf(os.Stderr, "could not save configuration: %s\n", err)
os.Exit(1)
}
}
b.NoiseSuppressor.SetEnabled(enabled)