diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-23 13:52:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-23 13:52:08 +0900 |
| commit | d9cc83f4e775ed7f59cf21f350b2140c29cf6b07 (patch) | |
| tree | 12eec752d12ee27c1caf3b1293d8cc10eddbe06a /crates/mozart/src/commands/check_platform_reqs.rs | |
| parent | 6f027ee80846a14e653ae128e4369e9cec221a63 (diff) | |
| download | php-mozart-d9cc83f4e775ed7f59cf21f350b2140c29cf6b07.tar.gz php-mozart-d9cc83f4e775ed7f59cf21f350b2140c29cf6b07.tar.zst php-mozart-d9cc83f4e775ed7f59cf21f350b2140c29cf6b07.zip | |
refactor(cli): replace std::process::exit() with bail_silent in command handlers
Improves testability and ensures proper resource cleanup by returning
errors through the existing MozartError/exit_code mechanism instead of
terminating the process directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/check_platform_reqs.rs')
| -rw-r--r-- | crates/mozart/src/commands/check_platform_reqs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart/src/commands/check_platform_reqs.rs b/crates/mozart/src/commands/check_platform_reqs.rs index f8c9d72..b3197c1 100644 --- a/crates/mozart/src/commands/check_platform_reqs.rs +++ b/crates/mozart/src/commands/check_platform_reqs.rs @@ -104,7 +104,7 @@ pub async fn execute( } if exit_code != 0 { - std::process::exit(exit_code); + return Err(mozart_core::exit_code::bail_silent(exit_code)); } Ok(()) |
