Today I encountered something I didn't understand. I have an uberjar which I start with java -jar backend.jar . I have an nrepl server running on the backend so I can REPL in prod. To my surprise when I evaluate (get (System/getenv) "LEIN_VERSION") it returns the version. This env var is NOT present in the environment. What could be setting it?
could that REPL be running under a different session as the running process, and maybe the REPL process/lein uses export(1) to put that var into the session on startup of the REPL?
How did you determine that this env var is not set in the environment? Last I checked the JVM was unable to change its own environment.
I ran bash in that container and checked output of env
(if I remember correctly… it was a while ago.. )
Yeah, sorry for reviving this. Is this still worth investigating or have you moved on?
I’ve migrated to deps.edn since.. and it was not a problem really, I was just confused. 🙂