Skip to content

Commit 6355cea

Browse files
committed
fix: resolve symlinks in tree root
1 parent 9399cd6 commit 6355cea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ func FromViper(v *viper.Viper) (*Config, error) {
206206
return nil, fmt.Errorf("failed to get absolute path for tree root: %w", err)
207207
}
208208

209+
// resolve symlinks in tree root
210+
if cfg.TreeRoot, err = filepath.EvalSymlinks(cfg.TreeRoot); err != nil {
211+
return nil, fmt.Errorf("tree root %s not found: %w", cfg.TreeRoot, err)
212+
}
213+
209214
// prefer top level excludes, falling back to global.excludes for backwards compatibility
210215
if len(cfg.Excludes) == 0 {
211216
cfg.Excludes = cfg.Global.Excludes

0 commit comments

Comments
 (0)