I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service.
So I update curl on Mac OS Terminal:
$ curl -V
curl 7.49.0 (x86_64-apple-darwin10.8.0) libcurl/7.49.0 OpenSSL/1.0.2h zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
So it works in Terminal and gives back the right answer:
But when I try to call the same command via do shell script in Apple Script it responds this:
So – is the problem, that curl in the do shell script environment isn't updated - and how could I do this? Or what is the problem?
do shell script
command gets passed"/usr/bin:/bin:/usr/sbin:/sbin"
as the$PATH
and therefore any commands called that are not within that path need to use the fully qualified pathname in the command. This also applies to commands called in Automator when using Run Shell Script and Run AppleScript actions too.