@@ -59,6 +59,9 @@ if ! command -v script >/dev/null 2>&1; then
5959 exit 1
6060fi
6161
62+ # macOS buffers typescript files for up to 30 seconds unless -F is used. The
63+ # watcher checks below must observe each message as soon as it is written.
64+
6265normalize_output () {
6366 sed -E $' s/\033 \\ [[0-9;]*[[:alpha:]]//g' \
6467 | sed -e ' s/\[clean\]/🧹/g' -e ' s/\[parse\]/🧱/g' \
@@ -119,7 +122,7 @@ capture() {
119122 command_executable=$( command_path " $executable " )
120123 command_project=$( command_path " $work /$implementation " )
121124 if [ " $( uname -s) " = Darwin ]; then
122- script -q " $transcript " env -u NO_COLOR \
125+ script -qF " $transcript " env -u NO_COLOR \
123126 " TERM=xterm" \
124127 " CLICOLOR=1" \
125128 " CLICOLOR_FORCE=0" \
@@ -195,7 +198,7 @@ capture_parse_warning_order() {
195198 command_executable=$( command_path " $executable " )
196199 command_project=$( command_path " $project " )
197200 if [ " $( uname -s) " = Darwin ]; then
198- script -q " $transcript " env -u NO_COLOR \
201+ script -qF " $transcript " env -u NO_COLOR \
199202 " TERM=xterm" \
200203 " CLICOLOR=1" \
201204 " CLICOLOR_FORCE=0" \
@@ -244,7 +247,7 @@ capture_after_build_order() {
244247 command_executable=$( command_path " $executable " )
245248 command_project=$( command_path " $project " )
246249 if [ " $( uname -s) " = Darwin ]; then
247- script -q " $transcript " env -u NO_COLOR \
250+ script -qF " $transcript " env -u NO_COLOR \
248251 " TERM=xterm" \
249252 " CLICOLOR=1" \
250253 " CLICOLOR_FORCE=0" \
@@ -308,7 +311,7 @@ capture_quiet_build() {
308311 command_executable=$( command_path " $executable " )
309312 command_project=$( command_path " $work /$implementation " )
310313 if [ " $( uname -s) " = Darwin ]; then
311- script -q " $transcript " env -u NO_COLOR \
314+ script -qF " $transcript " env -u NO_COLOR \
312315 " TERM=xterm" \
313316 " CLICOLOR=1" \
314317 " CLICOLOR_FORCE=0" \
@@ -339,7 +342,7 @@ capture_clean() {
339342 command_executable=$( command_path " $executable " )
340343 command_project=$( command_path " $work /$implementation " )
341344 if [ " $( uname -s) " = Darwin ]; then
342- script -q " $transcript " env -u NO_COLOR \
345+ script -qF " $transcript " env -u NO_COLOR \
343346 " TERM=xterm" \
344347 " CLICOLOR=1" \
345348 " CLICOLOR_FORCE=0" \
@@ -392,7 +395,7 @@ capture_quiet_clean() {
392395 command_executable=$( command_path " $executable " )
393396 command_project=$( command_path " $work /$implementation " )
394397 if [ " $( uname -s) " = Darwin ]; then
395- script -q " $transcript " env -u NO_COLOR \
398+ script -qF " $transcript " env -u NO_COLOR \
396399 " TERM=xterm" \
397400 " CLICOLOR=1" \
398401 " CLICOLOR_FORCE=0" \
@@ -470,7 +473,7 @@ capture_watch_rebuild() {
470473 local command_executable=$( command_path " $executable " )
471474 local command_project=$( command_path " $project " )
472475 if [ " $( uname -s) " = Darwin ]; then
473- script -q " $transcript " env -u NO_COLOR \
476+ script -qF " $transcript " env -u NO_COLOR \
474477 " TERM=xterm" \
475478 " CLICOLOR=1" \
476479 " CLICOLOR_FORCE=0" \
@@ -602,7 +605,7 @@ capture_initial_failure_recovery() {
602605 local command_executable=$( command_path " $executable " )
603606 local command_project=$( command_path " $project " )
604607 if [ " $( uname -s) " = Darwin ]; then
605- script -q " $transcript " env -u NO_COLOR \
608+ script -qF " $transcript " env -u NO_COLOR \
606609 " TERM=xterm" \
607610 " CLICOLOR=1" \
608611 " CLICOLOR_FORCE=0" \
@@ -700,7 +703,7 @@ capture_warning_watch() {
700703 local command_executable=$( command_path " $executable " )
701704 local command_project=$( command_path " $project " )
702705 if [ " $( uname -s) " = Darwin ]; then
703- script -q " $transcript " env -u NO_COLOR \
706+ script -qF " $transcript " env -u NO_COLOR \
704707 " TERM=xterm" \
705708 " CLICOLOR=1" \
706709 " CLICOLOR_FORCE=0" \
0 commit comments