Skip to content

Commit

Permalink
Only exit with 101 status code in presence of eqwalizer diagnostics
Browse files Browse the repository at this point in the history
Summary: Only fail with `101` in presence of errors.

Reviewed By: Balajiganapathi

Differential Revision: D67381789

fbshipit-source-id: 6ae5ec038e8ad0f4f346696e63d5086647a9083c
  • Loading branch information
robertoaloi authored and facebook-github-bot committed Dec 18, 2024
1 parent 00bd9a8 commit c1a25fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/elp/src/bin/eqwalizer_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ fn eqwalize(
.file_for_module(module.as_str())
.with_context(|| format!("module {} not found", module))?;
reporter.write_eqwalizer_diagnostics(file_id, &diagnostics)?;
has_errors = true;
if !diagnostics.is_empty() {
has_errors = true;
}
}
if analysis.eqwalizer().mode == Mode::Shell {
reporter.write_stats(eqwalized, files_count as u64)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/elp/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ mod tests {
#[test_case(true ; "buck")]
fn eqwalize_all_bail_on_error_success(buck: bool) {
if otp_supported_by_eqwalizer() {
simple_snapshot_expect_error(
simple_snapshot(
args_vec!["eqwalize", "--bail-on-error", "app_a_no_errors"],
"standard",
expect_file!(
Expand Down

0 comments on commit c1a25fd

Please sign in to comment.