diff options
| author | akbash <akbash@herdr.dev> | 2026-08-19 20:39:24 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-19 20:39:24 +0300 |
| commit | e3c3d443584b629803a73ad66e0e298943c7f201 (patch) | |
| tree | 639abd8b3d8f03d07d05eef47ca025cafaeda02b /src/cli.rs | |
| parent | 5203a5dc0f39a082938ea0f9836d6257ea7e155f (diff) | |
fix(cli): exit quietly when output pipes close (#2996)
refs #2994
Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -8,6 +8,20 @@ use crate::api::schema::{ ReadSource, Request, SplitDirection, }; +macro_rules! print { + ($($arg:tt)*) => {{ + crate::platform::begin_cli_output(); + std::print!($($arg)*); + }}; +} + +macro_rules! println { + ($($arg:tt)*) => {{ + crate::platform::begin_cli_output(); + std::println!($($arg)*); + }}; +} + mod agent; mod api; mod completion; @@ -194,6 +208,7 @@ fn channel_set(args: &[String]) -> std::io::Result<i32> { ChannelSetInstallAction::RunSelfUpdate => {} } + crate::platform::end_cli_output(); if let Err(err) = crate::update::self_update(crate::update::SelfUpdateOptions::default()) { eprintln!("update failed: {err}"); eprintln!("Run `herdr update` to retry."); |
