-
Notifications
You must be signed in to change notification settings - Fork 422
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
magika -r /nonexistant
exits with 0
#780
Comments
Nice catch. I see multiple options which can be controlled by a flag:
I would personally be fine with only the first option and no flag. |
I like the first option. To be specific, we could do: in case of errors with a one or more files, I would anyways keep going forward and scan everything we can, and just exit 1 at the very end to signal "something went wrong with at least one file", where "went wrong" means something like permission error, file does not exist, and the like. |
Consider:
This currently exits with 0. I would have expected an error code (this is one of the assumption for the gh workflow test suite).
Unclear what's the cleanest thing to do. If there at least one file that gets predicted without errors we could still return 0; but it's weird to return "no problems" when there is not a single file that has been successfully scanned? Maybe we return non-zero if no files has been scanned; zero otherwise?
Thoughts @ia0?
The text was updated successfully, but these errors were encountered: