Re: NSTask and environment variables

2008-12-10 Thread Ken Thomases
On Dec 9, 2008, at 4:51 AM, Ingvar Nedrebo wrote: On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and

Re: NSTask and environment variables

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 11:51, Ingvar Nedrebo a écrit : On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and e

Re: NSTask and environment variables

2008-12-09 Thread Ingvar Nedrebo
On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and extend it before passing it to NSTask. Is there

Re: NSTask and environment variables

2008-12-08 Thread j o a r
On Dec 8, 2008, at 4:43 PM, Chris Idou wrote: Is there any Cocoa API which returns the environment as a NSDictionary, or do I need to drop down to the UNIX getenv() level? See: -[NSProcessInfo environment] j o a r ___ Cocoa-dev mailin

NSTask and environment variables

2008-12-08 Thread Chris Idou
I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and extend it before passing it to NSTask. Is there any Cocoa API which returns the environment as a N