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():