forked from NotAShelf/beer
pty: propagate the shell's exit status
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9f33a222a19794b6ad2910fb6029796f6a6a6964
This commit is contained in:
parent
5690e0e883
commit
56907b4115
2 changed files with 21 additions and 9 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue