-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(cli): error on missing config file #7154
fix(cli): error on missing config file #7154
Conversation
Thank you for the PR. Couple of comments:
|
|
@simar7 It currently returns an error when a user specifies
|
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.
We can fix the logger initialization problem in another PR. This change is already valuable. We should merge this PR.
The current behavior is to log a debug message and continue which means that the scan that will happen will not match the expectation of the user. Now, if a user explicitly set the config file path, an error will be raised otherwise, the original behavior will apply.
This will inform the user better when the default configuration file is not found.
dda5824
to
28c1cc2
Compare
28c1cc2
to
3d397f0
Compare
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.
LGTM. Thanks!
Part of the message is OS dependent so remove it to ensure it passes on all platforms.
Head branch was pushed to by a user without write access
@knqyf263 You're welcome ! I just fixed the test issue: it's the OS specific part of the string that makes it fail. I removed that part from the string check however would you rather have a fixed message ? |
It looks good to me. |
I missed that the tests have failed and I can't see the content anymore, is there something I can do trigger them again beside rebasing my branch ? |
You can merge the main branch and let's see how it goes. |
Done as requested |
Description
This PR will make trivy error if the configuration file passed in parameter cannot be found.
However, to stay consistent with the current behaviour
Related issues
Checklist