Skip to content

Commit

Permalink
Merge #775
Browse files Browse the repository at this point in the history
775: Forward Cargo exit code r=Alexhuszagh,Emilgardis a=Jules-Bertholet

Forward Cargo's exit code. For example, if `cargo test` returns a non-zero exit code due to a failing test, `cross` will also return a non-zero exit code.

Co-authored-by: Jules Bertholet <[email protected]>
  • Loading branch information
bors[bot] and Jules-Bertholet authored Jun 10, 2022
2 parents d8034d4 + 5b7471d commit 23fd0af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Added

- #775 - forward Cargo exit code to host
- #767 - added the `cross-util` and `cross-dev` commands.
- #745 - added `thumbv7neon-*` targets.
- #741 - added `armv7-unknown-linux-gnueabi` and `armv7-unknown-linux-musleabi` targets.
Expand Down
7 changes: 5 additions & 2 deletions src/bin/cross.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

pub fn main() -> cross::Result<()> {
cross::install_panic_hook()?;
cross::run()?;
Ok(())
let status = cross::run()?;
let code = status
.code()
.ok_or_else(|| eyre::Report::msg("Cargo process terminated by signal"))?;
std::process::exit(code)
}

0 comments on commit 23fd0af

Please sign in to comment.