Fix parsing of config set aborting on non-existent files

This commit is contained in:
Kovid Goyal
2026-06-02 21:19:04 +05:30
parent 54ecc67339
commit cb0f05c4e4

View File

@@ -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).