AppleScript "do shell script" ignores PATH Variable
I'm trying to build an automated build script with applescript on MacOS X.
For now everything works correctly with one glitch.
The command "do script ("zipalign -f -v 4 /tmp/src.apk /tmp/tgt.apk")
works fine if I run it in a separate tell for application "Terminal" but
leaves the terminal window open when it's done. Everything else in the
script works fine in tells for application "Finder".
If I try to run the command via "do shell script" inside the tell for
"Finder" I only get an error "command not found".
The path to zipalign is set in /etc/paths and is reachable through any
terminal window and "do shell" but not to "do shell script" command.
What is the correct way to ensure that "do shell script" uses $PATH to
find commands or alternatively is there a bulletproof way to close the
terminal left by "do script"?
No comments:
Post a Comment