diff --git a/teos/src/cli.rs b/teos/src/cli.rs index dbc345df..7f9fe188 100644 --- a/teos/src/cli.rs +++ b/teos/src/cli.rs @@ -80,10 +80,16 @@ async fn main() { Ok(appointments) => { println!("{}", pretty_json(&appointments.into_inner()).unwrap()) } - Err(status) => println!("{}", status.message()), + Err(status) => { + eprintln!("{}", status.message()); + std::process::exit(1); + } } } - Err(e) => println!("{e}"), + Err(e) => { + eprintln!("{e}"); + std::process::exit(1); + } }; } Command::GetTowerInfo => { @@ -106,10 +112,16 @@ async fn main() { Ok(response) => { println!("{}", pretty_json(&response.into_inner()).unwrap()) } - Err(status) => println!("{}", status.message()), + Err(status) => { + eprintln!("{}", status.message()); + std::process::exit(1); + } } } - Err(e) => println!("{e}"), + Err(e) => { + eprintln!("{e}"); + std::process::exit(1); + } }; } Command::Stop => {