From 60fbbd75b8dc9af65630f5ced31424eea80ac835 Mon Sep 17 00:00:00 2001 From: Tristan Michael Date: Mon, 30 Mar 2026 16:14:52 -0700 Subject: [PATCH] fix(cli): add confirmation prompt before task deletion Match the existing confirmation pattern used by list delete and workspace remove commands. --- crates/bevy-tasks-cli/src/commands/task.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/bevy-tasks-cli/src/commands/task.rs b/crates/bevy-tasks-cli/src/commands/task.rs index ede6693..32f7cd5 100644 --- a/crates/bevy-tasks-cli/src/commands/task.rs +++ b/crates/bevy-tasks-cli/src/commands/task.rs @@ -93,6 +93,17 @@ pub fn delete(task_id_str: String, workspace: Option) -> Result<()> { if let Some(task) = list.tasks.iter().find(|t| t.id == task_id) { let title = task.title.clone(); + output::warning(&format!("This will delete task \"{}\"", title)); + print!("Continue? (y/n): "); + use std::io::{self, Write}; + io::stdout().flush()?; + let mut input = String::new(); + io::stdin().read_line(&mut input)?; + if input.trim().to_lowercase() != "y" { + println!("Cancelled"); + return Ok(()); + } + repo.delete_task(list.id, task_id) .context("Failed to delete task")?;