Fix CWD is not correctly respected when appending child paths
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`.
This commit is contained in:
@@ -185,7 +185,7 @@ impl DebugTaskDefinition {
|
||||
command,
|
||||
args,
|
||||
task_type,
|
||||
cwd: if cwd.is_some() { self.cwd } else { None },
|
||||
cwd: self.cwd,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user