From ffad1d231065dc9de54688709ca96a43edf8bbf2 Mon Sep 17 00:00:00 2001 From: Santiago Date: Wed, 17 Jun 2026 17:59:15 -0300 Subject: [PATCH] fix(invoke): exit non-zero when cshell resolve fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tx_invoke_interactive` ran cshell via `.output()` but never inspected the exit status, so a failed `trix invoke` (e.g. a TRP resolve error) printed `❗️ error: …` and still returned `Ok(())` — the process exited 0. Check `output.status.success()` and bail on failure, mirroring the sibling `tx_invoke_json`. The error now propagates through `wallet.invoke_interactive` → the invoke command → `main`, yielding a non-zero exit so callers and CI can detect a failed resolve. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/spawn/cshell.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/spawn/cshell.rs b/src/spawn/cshell.rs index 3058519..c660386 100644 --- a/src/spawn/cshell.rs +++ b/src/spawn/cshell.rs @@ -339,13 +339,18 @@ pub fn tx_invoke_interactive( provider, )?; - cmd.stdout(Stdio::inherit()) + let output = cmd + .stdout(Stdio::inherit()) .stdin(Stdio::inherit()) .stderr(Stdio::inherit()) .output() .into_diagnostic() .context("running CShell transaction")?; + if !output.status.success() { + bail!("CShell failed to execute transaction"); + } + Ok(()) }