(415e1c3) Fix worklane.ts tool when passed multi-line args

This commit is contained in:
2026-05-15 20:59:29 +02:00
parent 2a96abd3b0
commit 73e5aee2a2
4 changed files with 174 additions and 5 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ pub enum Command {
/// Ticket description
#[arg(short, long)]
description: Option<String>,
description: Vec<String>,
/// Acceptance criteria (comma-separated)
#[arg(short, long)]
+6 -4
View File
@@ -89,7 +89,7 @@ pub fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()>
pub fn cmd_add(
title: &str,
description: &Option<String>,
description: &[String],
acceptance: &[String],
plan: &[String],
tags: &[String],
@@ -119,9 +119,11 @@ pub fn cmd_add(
return Err(anyhow!("A ticket with this title already exists."));
}
let description_text = description
.as_deref()
.unwrap_or("_No description provided._");
let description_text = if description.is_empty() {
"_No description provided._".to_string()
} else {
description.join("\n")
};
let mut body = format!(
"# {}\n\