Rarely, in the default Terminal on macOS, get_apple_terminal_bg_color raises an error because the osascript process returns an exit code of 1.
Expected behavior
Because Font Bakery only runs osascript to determine the proper output theme, which is not very important, it should use a fallback theme instead of failing the build when osascript errors.
Resources and steps needed to reproduce
It is hard to reproduce this in Font Bakery, but the following script shows that it can fail in general. It usually terminates in a few minutes.
while :
do
for i in {1..10}
do
osascript -e 'tell application "Terminal"' -e ' get background color of selected tab of window 1' -e 'end tell' >/dev/null &
done
osascript -e 'tell application "Terminal"' -e ' get background color of selected tab of window 1' -e 'end tell' >/dev/null
if [ $? -ne 0 ]; then break; fi
done
The error message is
36:52: execution error: Terminal got an error: Can’t get selected tab of window 1. (-1728)
Observed behavior
Rarely, in the default Terminal on macOS,
get_apple_terminal_bg_color
raises an error because the osascript process returns an exit code of 1.Expected behavior
Because Font Bakery only runs osascript to determine the proper output theme, which is not very important, it should use a fallback theme instead of failing the build when osascript errors.
Resources and steps needed to reproduce
It is hard to reproduce this in Font Bakery, but the following script shows that it can fail in general. It usually terminates in a few minutes.
The error message is