-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow CLJ_WATSON_* env vars for CI-friendly properties #104
Comments
I think that's right, except JVM properties on invocation should override env vars, right? |
#66 initially said that, but when the handling of env vars was considered by calling If env vars should not override JVM properties set at invocation, then the logic around calling I'm open to both approaches -- do you have a strong preference? I guess |
Well, I think it might be conventional to be able to override the environment from the command line? I'll paste my experiment but annotate it: What's my time zone? $ clojure -M -e "(-> (java.util.TimeZone/getDefault) .getDisplayName)"
"Eastern Standard Time" Let's override that with the $ TZ="US/Hawaii" clojure -M -e "(-> (java.util.TimeZone/getDefault) .getDisplayName)"
"Hawaii-Aleutian Standard Time" And now let's override the environment with the command line: $ TZ="US/Hawaii" clojure -J-Duser.timezone="UTC" -M -e "(-> (java.util.TimeZone/getDefault) .getDisplayName)"
"Coordinated Universal Time" |
Yeah, I asked Copilot (MS Copilot) so it could summarize from web results with footnotes/links, and then I looked for similar questions on StackOverflow, and the consensus is definitely that JVM properties should take precedence over env vars. I'll update the cascade in #66 accordingly. Thanks. |
Signed-off-by: Sean Corfield <[email protected]>
…-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)
Split off from #66 cc @lread
Search all of the user's env vars, for any that start with
CLJ_WATSON_
, map the rest of it to a property name (lowercase,_
->.
), and then set that dynamically as a property name.I believe this will cause env vars to override any JVM properties on the
java
/clojure
CLI invocation?Document the new behavior.
The text was updated successfully, but these errors were encountered: