Skip to content
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

Accept environment variables spelled with underscores #217

Merged
merged 2 commits into from Sep 6, 2016

Conversation

kuhnmi
Copy link

@kuhnmi kuhnmi commented Sep 5, 2016

Environment variables with dots are hard to handle in unix shells (e.g. bash). A quick google search for 'environment variables dots' shows that many people struggle with such variables, e.g.:

http://unix.stackexchange.com/questions/93532/exporting-a-variable-with-dot-in-it
http://askubuntu.com/questions/65638/how-to-set-env-with-a-dot
http://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names

To make custom configurations easier on unix systems, this PR makes find-sec-bugs also accept environment variables spelled with underscores (_) instead of dots (.). E.g. findsecbugs_taint_customconfigfile instead of findsecbugs.taint.customconfigfile. Using environment variables (rather than system properties) for configuration is e.g. helpful when using find-sec-bugs with gradle.

Additionally, I've added a small change that fails early if some custom file/resource cannot be found. Otherwise it would just fail a bit later with an NPE not telling which file/resource could not be found.

@h3xstream h3xstream merged commit 695ca8a into find-sec-bugs:master Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants