Skip to content

The agent that grows with you

test(install): preserve bash path in probe regression

fangliquan6d92f105fe13
diff --git a/tests/scripts/install/test_install_sh_system_package_probe.py b/tests/scripts/install/test_install_sh_system_package_probe.py
index 9536f380612..2c798a70ddf 100644
--- a/tests/scripts/install/test_install_sh_system_package_probe.py
+++ b/tests/scripts/install/test_install_sh_system_package_probe.py
@@ -23,6 +23,9 @@ def _write_executable(path: Path, body: str) -> None:
def test_system_package_probe_finds_commands_in_link_dir(tmp_path):
+ bash = shutil.which("bash")
+ assert bash is not None
+
home = tmp_path / "home"
link_dir = home / ".local" / "bin"
path_dir = tmp_path / "path"
@@ -42,7 +45,7 @@ def test_system_package_probe_finds_commands_in_link_dir(tmp_path):
'printf "ripgrep=%s ffmpeg=%s\\n" "$HAS_RIPGREP" "$HAS_FFMPEG"\n'
)
result = subprocess.run(
- ["bash", "-c", script],
+ [bash, "-c", script],
capture_output=True,
text=True,
check=True,