From cb0f05c4e403f0603d2067d220ea048296c0ea63 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Jun 2026 21:19:04 +0530 Subject: [PATCH] Fix parsing of config set aborting on non-existent files --- tools/watch/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/watch/api.go b/tools/watch/api.go index 0a1acc229..69a068860 100644 --- a/tools/watch/api.go +++ b/tools/watch/api.go @@ -93,6 +93,10 @@ func safe_eval_symlinks(path string) string { func get_set_of_config_files(config_paths []string) *utils.Set[string] { cp := config.ConfigParser{ AllIncludedFiles: utils.NewSet[string](), LineHandler: func(k, v string) error { return nil }} + config_paths = utils.Filter(config_paths, func(path string) bool { + _, err := os.Stat(path) + return err == nil + }) cp.ParseFiles(config_paths...) // Resolve symlinks in all paths collected by the parser (important on macOS // where /tmp -> /private/tmp causes mismatches with FSEvents-reported paths).