olix0r / cargo-action-fmt

Converts cargo check (and clippy) JSON output to the GitHub Action error format
MIT License
13 stars 2 forks source link

cargo-action-fmt can "swallow" error return codes #153

Open jamesmunns opened 1 year ago

jamesmunns commented 1 year ago

Hi there! In https://github.com/tosc-rs/mnemos/pull/226#issuecomment-1675539413 we realized that piping to cargo-action-fmt seemed to swallow the error code output of cargo check, without failing the build in some other way.

Normally this should be fixed with set -o pipefail, but we are also using just.

This is extra weird because in this case cargo produces NO output:

james@Jamess-MacBook-Pro ➜  mnemos git:(eliza/forced-x86-target) cargo check --lib --bins --examples --tests --benches --all-features --package mnemos-x86_64-bootloader --message-format=json
error: no library targets found in package `mnemos-x86_64-bootloader`

This may not be reasonable for you to fix, but thought I would share just in case!