tests: use command instead of absolute paths

These binaries are not guaranteed to exist at /bin/X on all systems,
e.g. nixos does not place binaries there, but as long as they are in the
PATH we can find them with command.

Part of #12544
This commit is contained in:
Noah Hellman
2026-03-13 17:50:04 +01:00
committed by Johannes Altmanninger
parent d1d4cbf3f8
commit a0d8d27f45
8 changed files with 20 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ with tempfile.NamedTemporaryFile(mode="r", encoding="utf8") as tf:
fish_pid = sp.spawn.pid
sp.expect_prompt()
sp.sendline(
"function myexit --on-event fish_exit; /bin/echo $fish_pid > {filename}; end".format(
"function myexit --on-event fish_exit; command echo $fish_pid > {filename}; end".format(
filename=tf.name
)
)

View File

@@ -11,7 +11,7 @@ send, sendline, expect_prompt, expect_str = (
)
expect_prompt()
sendline("function echo_wrap ; /bin/echo $argv ; sleep 0.1; end")
sendline("function echo_wrap ; command echo $argv ; sleep 0.1; end")
expect_prompt()
if not os.environ.get("fish_test_helper", ""):