From f8fbf7c3856eb4cb5af6558a6931c4ccd7fed42b Mon Sep 17 00:00:00 2001 From: yotamleo <88616986+yotamleo@users.noreply.github.com> Date: Fri, 11 Sep 2026 23:52:01 +0200 Subject: [PATCH] test(hooks): quote the marker path in the interrupt test's hook script An unquoted redirect target breaks if the pytest tmp dir contains a space: the hook then never writes its pid and the test waits out the 300 s hook instead of failing fast. The neighbouring tests in this file are unquoted, so only the new test is changed here. Co-Authored-By: Claude Opus 5 --- tests/agent/test_shell_hooks_tree_kill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/agent/test_shell_hooks_tree_kill.py b/tests/agent/test_shell_hooks_tree_kill.py index a6c26588a2..6e5c298ca0 100644 --- a/tests/agent/test_shell_hooks_tree_kill.py +++ b/tests/agent/test_shell_hooks_tree_kill.py @@ -164,7 +164,7 @@ def test_interrupt_kills_hook_and_propagates(tmp_path): """ marker = tmp_path / "hook.pid" script = tmp_path / "hook.sh" - script.write_text(f"#!/bin/bash\necho $$ > {marker}\nsleep 300\n") + script.write_text(f'#!/bin/bash\necho $$ > "{marker}"\nsleep 300\n') script.chmod(0o755) def interrupt_once_running():