Bail and signal error when the cwd of a resolved task doesn't exist (#32777)
Closes #32688 Release Notes: - Fixed tasks (including build tasks for debug configurations) silently using `/` as a working directory when the specified `cwd` didn't exist.
This commit is contained in:
parent
0f0ff40c6d
commit
22a2ff4f12
6 changed files with 54 additions and 4 deletions
|
@ -850,9 +850,18 @@ impl RunningState {
|
|||
(task, None)
|
||||
}
|
||||
};
|
||||
let Some(task) = task_template.resolve_task("debug-build-task", &task_context) else {
|
||||
let Some(task) = task_template.resolve_task_and_check_cwd("debug-build-task", &task_context, cx.background_executor().clone()) else {
|
||||
anyhow::bail!("Could not resolve task variables within a debug scenario");
|
||||
};
|
||||
let task = match task.await {
|
||||
Ok(task) => task,
|
||||
Err(e) => {
|
||||
workspace.update(cx, |workspace, cx| {
|
||||
workspace.show_error(&e, cx);
|
||||
}).ok();
|
||||
return Err(e)
|
||||
}
|
||||
};
|
||||
|
||||
let locator_name = if let Some(locator_name) = locator_name {
|
||||
debug_assert!(!config_is_valid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue