Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(error): surface anyhow chain in spawn and ref-update error messages (#2251)
Worktrunk Botb2546175b871
diff --git a/src/commands/hooks.rs b/src/commands/hooks.rsindex ad4ae6161..2878ec4df 100644--- a/src/commands/hooks.rs+++ b/src/commands/hooks.rs@@ -417,7 +417,7 @@ fn spawn_hook_pipeline_quiet(ctx: &CommandContext, steps: Vec<SourcedStep>) -> a) {eprintln!("{}",- warning_message(format!("Failed to spawn pipeline: {err}"))+ warning_message(format!("Failed to spawn pipeline: {err:#}")));} else {let cmd_display = format!("{} hook run-pipeline", wt_bin.display());diff --git a/src/commands/worktree/push.rs b/src/commands/worktree/push.rsindex bd809aa15..cebb368a3 100644--- a/src/commands/worktree/push.rs+++ b/src/commands/worktree/push.rs@@ -361,7 +361,7 @@ pub fn handle_no_ff_merge(.run_command(&["update-ref", &target_ref, &merge_sha, &ctx.target_tip]).map_err(|e| GitError::PushFailed {target_branch: ctx.target_branch.clone(),- error: format!("Failed to update ref: {e}"),+ error: format!("Failed to update ref: {e:#}"),})?;// Sync the target worktree's working tree if it exists.diff --git a/src/summary.rs b/src/summary.rsindex 51ffa75f2..d27fda9a3 100644--- a/src/summary.rs+++ b/src/summary.rs@@ -258,7 +258,7 @@ pub(crate) fn generate_summary(let reset = Reset;cformat!("{INFO_SYMBOL}{reset} <bold>{branch}</>{reset} has no changes to summarize\n")}- Err(e) => format!("Error: {e}"),+ Err(e) => format!("Error: {e:#}"),}}