Do not resolve the symbolic link for the initial working directory

This commit is contained in:
Basil Crow
2025-07-02 17:37:30 -07:00
committed by Mitchell Hashimoto
parent f1f9d5eb4b
commit 182f8ddd1a

View File

@ -847,6 +847,15 @@ const Subprocess = struct {
else else
null; null;
// Propagate the current working directory (CWD) to the shell, enabling
// the shell to display the current directory name rather than the
// resolved path for symbolic links. This is important and based
// on the same behavior in Konsole and Kitty (see the linked issues):
// https://bugs.kde.org/show_bug.cgi?id=242114
// https://github.com/kovidgoyal/kitty/issues/1595
// https://github.com/ghostty-org/ghostty/discussions/7769
if (cwd) |pwd| try env.put("PWD", pwd);
// If we have a cgroup, then we copy that into our arena so the // If we have a cgroup, then we copy that into our arena so the
// memory remains valid when we start. // memory remains valid when we start.
const linux_cgroup: Command.LinuxCgroup = cgroup: { const linux_cgroup: Command.LinuxCgroup = cgroup: {