Closed jvican closed 6 years ago
Doing this would require hijacking System.getenv()
reflectively to get java.lang.ProcessEnvironment
et al, just like in https://stackoverflow.com/questions/9997292/how-to-read-environment-variables-in-scala.
Then, we would create an subclass of map that would get the environment map with a thread local. Since this is a pretty complicated process, I'm closing this ticket, as it's unlikely to be done in nailgun itself.
The system properties (
remoteEnv
in the code) depend on the nailgun client. They are accessible in the nailgun context. However, they need to be accessed explicitly at the use site: that code (which can come from dependencies) depending onjava.lang.System.getProperty
won't work.I think for user-defined system properties to be usable, Nailgun should have thread locals and update the system-wide properties with the user-defined properties per ngsession.