fix: prevent following symlinks for cd (#2423)

* fix: prevent resolving symlinks for `cd`

* Update `CHANGELOG.md`
This commit is contained in:
Joe Lim authored and GitHub committed 2026-03-10 14:27:49 +11:00
1 parent 7829dd0357
commit ede1e7e7c3
4 files changed
+12 -21

No files matched your search

+2 -5
View File
@@ -928,12 +928,9 @@ func insert(app *app, arg string) {
}
func cd(app *app, path string) error {
wd, err := os.Getwd()
if err != nil {
return fmt.Errorf("getting current directory: %w", err)
}
wd := app.nav.currDir().path
path, err = filepath.Abs(replaceTilde(path))
path, err := filepath.Abs(replaceTilde(path))
if err != nil {
return fmt.Errorf("getting absolute path: %w", err)
}