test(viewer): the fake agent waits a whole second (macOS's bash 3.2 takes no fraction)
The portable macOS job: `read -t 0.1` is "invalid timeout specification" in /bin/bash 3.2, so the fake agent never said ready. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
134e1424cf
commit
a944d0f51b
1 file changed
+3
-1
@@ -105,8 +105,10 @@ echo "fake-agent in $(basename "$(pwd)")"
|
||||
trap 'echo got-interrupt' INT
|
||||
trap 'echo "size $(stty size)"' WINCH
|
||||
echo ready
|
||||
# A whole second: macOS's /bin/bash is 3.2, whose `read -t` takes no
|
||||
# fraction (the portable job found it).
|
||||
while true; do
|
||||
if read -r -t 0.1 line; then echo "you-said: $line"; fi
|
||||
if read -r -t 1 line; then echo "you-said: $line"; fi
|
||||
done
|
||||
"#,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user