From a6c2b1a5854f6716ae2737707b716c8716a162df Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 01:15:45 +0900 Subject: fix(exec): use bail_silent for exit code and style binary listing Replace std::process::exit() with bail_silent() so Rust cleanup runs properly. Style the binary listing output with console_format\! markup to match Composer's Symfony Console styling. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/exec.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/mozart/src/commands/exec.rs b/crates/mozart/src/commands/exec.rs index 66bc93c..ef96939 100644 --- a/crates/mozart/src/commands/exec.rs +++ b/crates/mozart/src/commands/exec.rs @@ -1,4 +1,5 @@ use clap::Args; +use mozart_core::console_format; use std::path::{Path, PathBuf}; #[derive(Args)] @@ -37,12 +38,15 @@ pub async fn execute( bin_dir.display() ); } - println!("Available binaries:"); + println!( + "{}", + console_format!("Available binaries:") + ); for (name, is_local) in &binaries { if *is_local { - println!("- {} (local)", name); + println!("{}", console_format!("- {} (local)", name)); } else { - println!("- {}", name); + println!("{}", console_format!("- {}", name)); } } return Ok(()); @@ -100,7 +104,7 @@ pub async fn execute( let code = status.code().unwrap_or(1); if code != 0 { - std::process::exit(code); + return Err(mozart_core::exit_code::bail_silent(code)); } Ok(()) -- cgit v1.3.1