Re: Finding Files (was: watermark)
Re: Finding Files (was: watermark)
- Subject: Re: Finding Files (was: watermark)
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 23 Oct 2009 10:03:32 -0400
I think the important takeaway to remember is that "do shell script"
doesn't inherit your normal Terminal shell environment, so any
commands you've installed yourself (whether via MacPorts or Fink or
compiling yourself) won't be accessible accept by full path. And even
then you might find that you're missing an entry in your
shared-library search path or some other environment variable that the
application depends on.
If you find yourself unable to determine exactly what a command needs
to work properly, a sort of sledgehammer-to-the-thumbtack approach is
to try loading your whole bash login environment. Replace:
do shell script "your command goes here"
with
do shell script "bash -lc " & (quoted form of "your command goes here")
But that will be noticeably slower and might have undesirable
artifacts and/or errors, especially if your login setup assumes an
interactive terminal environment without checking.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden