From 60bfa636de9a1f969f3c7ba26d0e9ffe69f52e24 Mon Sep 17 00:00:00 2001 From: Jesse Chen Date: Wed, 11 Mar 2026 17:11:26 -0700 Subject: [PATCH] go config: remove EvalSymlinks from resolveWorkingDir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the config file (e.g. user.taskrunner.json) is a symlink, EvalSymlinks resolves the path to the symlink target's directory instead of the current working directory. This causes fswatch to watch the wrong repo in worktree clones. filepath.Abs alone is sufficient — it resolves relative to cwd without following symlinks. Co-Authored-By: Claude Opus 4.6 --- config/config.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/config.go b/config/config.go index 59a3317..2e68c8f 100644 --- a/config/config.go +++ b/config/config.go @@ -35,10 +35,6 @@ func resolveWorkingDir(filePath, pathOption string) (string, error) { return "", oops.Wrapf(err, "unable to find config file %s", filePath) } - configPath, err = filepath.EvalSymlinks(configPath) - if err != nil { - return "", oops.Wrapf(err, "failed to evaluate symlinks for config file: %s", filePath) - } return filepath.Join(filepath.Dir(configPath), pathOption), nil }