Skip to content

Commit

Permalink
cli: fixes bug where the wrong exit status is reported
Browse files Browse the repository at this point in the history
  • Loading branch information
RuvenSalamon committed Jan 25, 2023
1 parent 5f9b590 commit 490c0b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion avm/src/anchor/main.rs
Expand Up @@ -14,11 +14,15 @@ fn main() -> anyhow::Result<()> {
version
);
}
Command::new(binary_path)
let exit = Command::new(binary_path)
.args(args)
.spawn()?
.wait_with_output()
.expect("Failed to run anchor-cli");

if !exit.status.success() {
std::process::exit(exit.status.code().unwrap_or(1));
}

Ok(())
}

0 comments on commit 490c0b8

Please sign in to comment.