Skip to content

Commit

Permalink
Fix CWD is not correctly respected when appending child paths
Browse files Browse the repository at this point in the history
Right now when you add `"cwd": "$ZED_WORKTREE_ROOT/some/path"` to your config,
it won't work as expected. Because we only added the `cwd` to the task template when the cwd was a valid path.
But when you add `"cwd": "$ZED_WORKTREE_ROOT` to your config, it will never be a valid path, so the `cwd` will never be added to the task template and fallback to the `$ZED_WORKTREE_ROOT` already.

So by just always adding it to the task template, we will try to resolve it and otherwise fallback to the `$ZED_WORKTREE_ROOT`.
  • Loading branch information
RemcoSmitsDev committed Jan 3, 2025
1 parent f2722db commit 78d342d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/task/src/debug_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl DebugTaskDefinition {
command,
args,
task_type,
cwd: if cwd.is_some() { self.cwd } else { None },
cwd: self.cwd,
..Default::default()
})
}
Expand Down

0 comments on commit 78d342d

Please sign in to comment.