debugger: Fix up Rust test tasks definitions (#30232)
Closes #ISSUE Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
3cc8850a58
commit
ee56706d15
8 changed files with 53 additions and 27 deletions
|
@ -731,19 +731,30 @@ impl RunningState {
|
|||
(task, None)
|
||||
}
|
||||
};
|
||||
let Some(task) = task.resolve_task("debug-build-task", &task_context) else {
|
||||
anyhow::bail!("Could not resolve task variables within a debug scenario");
|
||||
};
|
||||
|
||||
let locator_name = if let Some(locator_name) = locator_name {
|
||||
debug_assert!(request.is_none());
|
||||
Some(locator_name)
|
||||
} else if request.is_none() {
|
||||
dap_store
|
||||
.update(cx, |this, cx| {
|
||||
this.debug_scenario_for_build_task(task.clone(), adapter.clone(), cx)
|
||||
.and_then(|scenario| match scenario.build {
|
||||
this.debug_scenario_for_build_task(
|
||||
task.original_task().clone(),
|
||||
adapter.clone().into(),
|
||||
task.display_label().to_owned().into(),
|
||||
cx,
|
||||
)
|
||||
.and_then(|scenario| {
|
||||
match scenario.build {
|
||||
Some(BuildTaskDefinition::Template {
|
||||
locator_name, ..
|
||||
}) => locator_name,
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.ok()
|
||||
.flatten()
|
||||
|
@ -751,10 +762,6 @@ impl RunningState {
|
|||
None
|
||||
};
|
||||
|
||||
let Some(task) = task.resolve_task("debug-build-task", &task_context) else {
|
||||
anyhow::bail!("Could not resolve task variables within a debug scenario");
|
||||
};
|
||||
|
||||
let builder = ShellBuilder::new(is_local, &task.resolved.shell);
|
||||
let command_label = builder.command_label(&task.resolved.command_label);
|
||||
let (command, args) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue