Skip to content

The agent that grows with you

test(hooks): quote the marker path in the interrupt test's hook script

yotamleof8fbf7c3856e
diff --git a/tests/agent/test_shell_hooks_tree_kill.py b/tests/agent/test_shell_hooks_tree_kill.py
index a6c26588a28..6e5c298ca09 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():