ZED_WORKTREE_ROOT should always point to a directory #22912
Labels
bite-size
small issues
bug
[core label]
good first issue
Issue suitable for first-time contributors
tasks
Check for existing issues
Describe the bug / provide steps to reproduce it
Steps to reproduce:
task: spawn
, selectzed env
at the bottom of the list.Documentation suggests this variable will point to a folder, which I believe makes sense:
zed/docs/src/tasks.md
Line 84 in 86f5bb1
Proposal: Behavior of
ZED_WORKTREE_ROOT
should match that default behavior ofcwd
which was improved in #22004 to not point at a file when spawned from a buffer that is outside of worktree (like the tasks.json example above).This makes it possible to spawn other applications into the correct working directory, even when that must be passed an argument, not just implicitly inherited from cwd/$PWD.
For example:
This does not work:
cd /tmp; alacritty
(working directory defaults to~
)This does work:
alacritty --working-directory=/tmp
Originally reported by @VOID404 here:
Zed Version and System Specs
Zed: v0.170.0 (Zed Nightly af1a3cb)
OS: macOS 14.7.0
Memory: 64 GiB
Architecture: aarch64
If applicable, add screenshots or screencasts of the incorrect state / behavior
No response
If applicable, attach your Zed.log file to this issue.
N/A
The text was updated successfully, but these errors were encountered: