I am trying to add a script to BBEdit 10 that will validate PHP files. I have enabled PHP & Web Sharing on my Mac and I think the script is accurate but I am having an issue which I think is being caused by a volume name having a space.
property phpref : "/usr/bin/php -l "
try
tell application "BBEdit" to get file of first text window
do shell script phpref & POSIX path of result
display dialog "Ok: " & result buttons {"Finished Checking"} default button 1
on error msg
display dialog "Err: " & msg buttons {"Finished Checking"} default button 1
end try
I am getting an error with get file of
. The error is: Could not open input file: /Volumes/ Data
The volume name is "Data HD" which is why I think the space is causing the issue. Can I escape a space when calling get file of
?