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:
Remco Smits
2025-01-03 22:10:01 +01:00
parent f2722db366
commit 78d342d582

View File

@@ -185,7 +185,7 @@ impl DebugTaskDefinition {
command,
args,
task_type,
cwd: if cwd.is_some() { self.cwd } else { None },
cwd: self.cwd,
..Default::default()
})
}