Skip to content

Commit

Permalink
eval: Don't warn about suppressed errors without -noerror
Browse files Browse the repository at this point in the history
  • Loading branch information
tavianator committed Aug 19, 2024
1 parent 46c3a6d commit 5d03c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ int bfs_eval(struct bfs_ctx *ctx) {
sigunhook(info_hook);
bfs_bar_hide(args.bar);

if (args.nerrors > 0) {
if (ctx->ignore_errors && args.nerrors > 0) {
bfs_warning(ctx, "Suppressed errors: %zu\n", args.nerrors);
}

Expand Down
2 changes: 2 additions & 0 deletions tests/bfs/warn_without_noerror.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# bfs shouldn't print "warning: Suppressed errors" without -noerror
! invoke_bfs inaccessible -warn 2>&1 >/dev/null | grep warning >&2

0 comments on commit 5d03c9d

Please sign in to comment.