-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: vulnerabilities should be printed when --fail-on
fails
#1395
Conversation
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
"github.com/anchore/grype/internal/log" | ||
) | ||
|
||
// eventLoop listens to worker errors (from execution path), worker events (from a partybus subscription), and | ||
// signal interrupts. Is responsible for handling each event relative to a given UI an to coordinate eventing until | ||
// an eventual graceful exit. | ||
func eventLoop(workerErrs <-chan error, signals <-chan os.Signal, subscription *partybus.Subscription, cleanupFn func(), uxs ...clio.UI) error { | ||
func eventLoop(workerErrs <-chan error, signals <-chan os.Signal, subscription *partybus.Subscription, cleanupFn func(), uxs ...clio.UI) error { //nolint:gocognit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the nolint
. I didn't see a great way to clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this being nolint
- it's legacy and meant to be stripped out eventually for the full cli refactor
--fail-on
results in failure--fail-on
fails
@@ -54,6 +54,14 @@ func TestCmd(t *testing.T) { | |||
assertInOutput("scope: all-layers"), | |||
}, | |||
}, | |||
{ | |||
name: "vulnerabilities in output on -f with failure", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks for the sanity check test here
Fixes #1392.