I have problems with some applications that use AppleScript shell script
feature. For example, Growl's uninstall scripts shows an error:
error "/bin/sh: rm: command not found" number 127
The source of the script is
display dialog (localized string "title")
if button returned of result = "OK" then
try
quit application id "com.Growl.GrowlHelperApp"
end try
try
quit application id "com.Growl.MenuExtra"
end try
do shell script "rm -rf /Library/PreferencePanes/Growl.prefPane ~/Library/PreferencePanes/Growl.prefPane" with administrator privileges
display dialog (localized string "succeeded") buttons {localized string "OK"} default button 1
end if
I've added echo $PATH > /omg.txt &&
to the command to see what's the search path for rm. But it has a weird value:
$ cat /omg.txt
â
What can I do? I don't understand what's going on. When I just run sudo /bin/sh
in Terminal, the environment is just fine!
Now, I know that to uninstall Growl I can just run the command it tries to run in the Terminal. But it won't solve this problem, just postpone it until another application fails with the same error (it happened before).