Re: Differences in output between AppleScript and Terminal
Re: Differences in output between AppleScript and Terminal
- Subject: Re: Differences in output between AppleScript and Terminal
- From: debt <email@hidden>
- Date: Fri, 10 Mar 2017 12:30:29 -0800
On Mar 10, 2017, at 11:34 AM, Andrew Oliver < email@hidden> wrote:
Why would you expect the environment to be the same?
I was expecting /usr/bin/env perl to be global, but I guess it’s not. So my question is... how can I get it to be? I want AppleScript to use my setup that I’ve created using perlbrew so that calling /usr/bin/env perl gives me the same version in AppleScript as it does in Terminal.
If you want to use a specific perl version in your do shell script, then set the environment variables as part of your shell command. As far as I know, perlbrew is doing that. That’s why I can change the version of Perl I’m using simply by by using the ‘switch’ command in perlbrew. The path is then written to .bash_profile. Is that what you’re referring to?
Anyway, running the Perl script in Terminal works the way I expect it to. Running the script in BBEdit works the why I expect it to. But calling it from AppleScript doesn’t. I guess I just don’t understand why AppleScript has to be the odd man out when it comes to this. There has to be a way to make everything place nice together. Perhaps telling AppleScript to use the same shell? Perhaps getting AppleScript to use the shebang line in the Perl script? I’m throwing everything I’ve got hoping something will stick. ;)
Is there no way to do this?
Marc |
_______________________________________________
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