bundler-audit icon indicating copy to clipboard operation
bundler-audit copied to clipboard

Add --no-exit-on-warn flag that exits with 0 even when vulnerable

Open MC-Squared opened this issue 7 years ago • 3 comments

Issue

I would like to run bundler-audit as part of our CI builds that test every branch/PR, however I do not want vulnerabilities to cause the build to be considered a failure. Obviously, this can be achieved in bash but Brakeman, which we also run, provides a --no-exit-on-warn flag for this purpose.

Fix

Added a --no-exit-on-warn flag that causes the CLI to exit with 0, even if vulnerabilities are found. Error cases, such as update failing, should be unaffected by this change.

MC-Squared avatar Oct 10 '18 21:10 MC-Squared

I think it would be more useful when 0 status will be returned in case when no solutions presents yet

zabolotnov87 avatar Oct 19 '18 11:10 zabolotnov87

@MC-Squared You forgot to add specs for your new feature.

ingemar avatar Feb 28 '19 07:02 ingemar

Was going to suggest just appending || true to the command to suppress any exit error codes.

postmodern avatar Dec 17 '20 02:12 postmodern