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

fixes #104 by supporting properties via environment variables #108

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

seancorfield
Copy link
Contributor

No description provided.

Signed-off-by: Sean Corfield <[email protected]>
Signed-off-by: Sean Corfield <[email protected]>
@seancorfield
Copy link
Contributor Author

@lread Feedback on adding support for env vars like this?

(->> props (.mergeProperties settings))
(->> props slurp .getBytes ByteArrayInputStream. (.mergeProperties settings))))
(let [settings (Settings.)
props
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nested let was bothering me 🙂

Comment on lines +40 to +44
(if p-value
(println (str "Ignoring " env-var " as " property " is already set."))
(do
(println (str "Setting " property " from " env-var "."))
(System/setProperty property value))))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the feedback to the user here!

@lread
Copy link
Contributor

lread commented Aug 19, 2024

It looks succinct and clean to me @seancorfield!

@seancorfield seancorfield merged commit 535aaf9 into main Aug 19, 2024
5 checks passed
@seancorfield seancorfield deleted the issue-104 branch August 19, 2024 23:13
lread added a commit to lread/clj-watson that referenced this pull request Aug 20, 2024
…-line-arg

* upstream/main:
  address clj-holmes#103 Streamline dependency(-)check.properties overrides (clj-holmes#106)
  fixes clj-holmes#104 by supporting properties via environment variables (clj-holmes#108)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants