pilosus / pip-license-checker

Check license types for third-party dependencies: permissive, copyleft, proprietory, etc.
https://blog.pilosus.org/posts/2021/09/07/pip-license-checker/
Other
68 stars 3 forks source link

CLI option to return non-zero exit code when certain license type found in totals #33

Closed pilosus closed 3 years ago

pilosus commented 3 years ago

Add a CLI option (-f or --fail) that defaults to an empty vector, that will hold license type and return non-zero exit code if the license type(s) is(/are) found in license type totals.

E.g. return exit code 1 if at least one license of type Permissive or Other is found:

pip-license-checker -r resources/requirements.txt --fail Permissive --fail Other