Likely mtasc writes the output to stderr instead of stdout. You can redirect stderr to stdout using 2>&1, so the command would be:
complieResult=$( mtasc 2>&1 -cp "$TM_MX_CLASSES" … )
Worked a treat!
[... from Ben's email ... ] This should get you the error output nicely formatted for HTML:
mtasc -cp "$TM_MX_CLASSES" -cp [....]
It did! and after wrestling with it for a while I now have a nice clean list of Warnings and Errors to click on.
Which lead me to try to use the TextMate.system( 'cmd', null) to automatically run a python script which cleans unused imports out of classes, but cannot get the following to fire:
echo "<a href="javascript:TextMate.system( '$TM_BUNDLE_SUPPORT/Tools/ test.sh', null );">test</a>"
My assumption is that $TM_BUNDLE_SUPPORT doesn't get escaped properly (Application Support being the culprit) in the name but haven't been successful in any solutions I've tried. Is there an easy way to do this?
One thing to note - running the javascript above without null as the second param crashes TM.
Cheers, Simon