kobo / groovyserv

Groovy's startup acceralator.
http://kobo.github.io/groovyserv/
Other
98 stars 10 forks source link

groovyclient -Cenv -e "println System.env.HI" don't work expectedly #14

Closed uehaj closed 12 years ago

uehaj commented 13 years ago

groovyclient -Cenv -e "println System.env.HI" don't work expectedly.

This version Groovyserv 0.5 replaces System.getenv(String) method by MOP because JDK' getenv returns the value of environment variable from it's own cache, so putenv() call (using JNA) is effective for child process of groovyserver, but the value returned from System.getenv(String) is not changed.

So, this version Groovyserv has own environment variable set, and MOP replaced verision of System.getenv(String) returns correspond value from there.

But of course "Map<String,String> System.getenv()" should be replaced by MOP also, we would like to fix this problem next version. Sorry for inconvenient.

nobeans commented 13 years ago

fixed at v0.7

nobeans commented 13 years ago

Oops, it's not fixed...

I fixed that System.getenv("HI") and System.getenv().HI and System.getenv()["HI"] at v0.7. But getenv() isn't getEnv(), so "System.env" means accessing just to "env" propperties...

I reopen and will fix it later.

nobeans commented 12 years ago

fixed at v0.10