mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Don't die if the watcher can't find the file. Continue trying
This commit is contained in:
parent
33ea383046
commit
79bc78a5f7
@ -141,10 +141,14 @@ func (wtfApp *WtfApp) watchForConfigChanges() {
|
||||
wtfApp.Stop()
|
||||
|
||||
config := cfg.LoadWtfConfigFile(wtfApp.configFilePath, wtfApp.isCustomConfig)
|
||||
|
||||
newApp := NewWtfApp(wtfApp.app, config, wtfApp.configFilePath, wtfApp.isCustomConfig)
|
||||
|
||||
newApp.Start()
|
||||
case err := <-watch.Error:
|
||||
if err == watcher.ErrWatchedFileDeleted {
|
||||
// Usually happens because the watcher looks for the file as the OS is updating it
|
||||
continue
|
||||
}
|
||||
log.Fatalln(err)
|
||||
case <-watch.Closed:
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user