Invoking command line commands with environment variables set
Invoking command line commands with environment variables set
- Subject: Invoking command line commands with environment variables set
- From: Terje Tjervaag <email@hidden>
- Date: Tue, 5 Aug 2003 10:54:42 +0200
A different problem now,
I want to invoke a command line program (ly2dvi from GNU/Lilypond
actually) through NSTask (or are there better ways of doing it?), but
this program needs some environment variables set for it to work.
These are set up when scripts from /etc/profile.d are run, and so I
assume they are run every time I start a new terminal.
ly2dvi starts up fine, and I am able to supply it with arguments, so my
problem is not with invoking NSTask (I am using
launchedTaskWithLaunchPath:). However, ly2dvi is a script I think, and
it bombs halfway through with a 'command not found' message, presumably
due to the missing environment variables.
Anyone have an idea on how this can be solved? Maybe I could run
ly2dvi from within a shell through NSTask somehow, but I don't know how
to do this (I attempted sh as the command and ly2dvi as the argument,
but that didn't work).
Thanks!
Terje
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.