[Pharo-project] A simple getenv primitive
Hi, I can't find any getenv primitive that would allow me to access environment an variable value from its name. This could be really helpful to get the HOME directory for example. Does one such primitive exist? If not, why? It looks trivial to implement for linux, and it is potentially also easy on Windows and Mac OS. I'm willing to try if necessary. Thank you -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
On 03.05.2012, at 10:24, Damien Cassou wrote:
Hi,
I can't find any getenv primitive that would allow me to access environment an variable value from its name. This could be really helpful to get the HOME directory for example. Does one such primitive exist? If not, why? It looks trivial to implement for linux, and it is potentially also easy on Windows and Mac OS. I'm willing to try if necessary.
Thank you
OSProcess thisOSProcess environmentAt: 'HOME' => '/Users/bert' - Bert -
On Thu, May 3, 2012 at 11:26 AM, Bert Freudenberg <bert@freudenbergs.de> wrote:
OSProcess thisOSProcess environmentAt: 'HOME'
=> '/Users/bert'
Thank you Bert. I never used OSProcess before it has never worked for me. Looks like it works now. Thanks -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
participants (2)
-
Bert Freudenberg -
Damien Cassou