pty: propagate the shell's exit status

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9f33a222a19794b6ad2910fb6029796f6a6a6964
This commit is contained in:
raf 2026-06-24 09:08:26 +03:00
commit 56907b4115
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
2 changed files with 21 additions and 9 deletions

View file

@ -23,7 +23,7 @@ struct Cli {
fn main() -> ExitCode {
init_logging();
match run(Cli::parse()) {
Ok(()) => ExitCode::SUCCESS,
Ok(code) => code,
Err(err) => {
tracing::error!("{err:#}");
eprintln!("beer: {err:#}");
@ -45,10 +45,9 @@ fn init_logging() {
.init();
}
fn run(cli: Cli) -> anyhow::Result<()> {
fn run(cli: Cli) -> anyhow::Result<ExitCode> {
if cli.server {
tracing::info!("starting beer server");
todo!("server mode")
anyhow::bail!("server mode is not implemented yet");
}
tracing::info!("starting beer");