Report configuration persistence failures
This commit is contained in:
committed by
Brandon McGinty
parent
655a109ce8
commit
ef8a92149d
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user