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
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
vm-dev@lists.squeakfoundation.org