From 707c869882db9e867ced53e0b58d6b887b044349 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sun, 23 Nov 2025 11:54:25 +0900 Subject: [PATCH] build-gnu.sh: Remove which for portability --- util/build-gnu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 4abcf8f48c1..986bad34d4e 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -350,8 +350,8 @@ sed -i 's/not supported/unexpected argument/' tests/mv/mv-exchange.sh # Most tests check that `/usr/bin/tr` is working correctly before running. # However in NixOS/Nix-based distros, the tr util is located somewhere in # /nix/store/xxxxxxxxxxxx...xxxx/bin/tr -# We just replace the references to `/usr/bin/tr` with the result of `$(which tr)` -sed -i 's/\/usr\/bin\/tr/$(which tr)/' tests/init.sh +# We just replace the references to `/usr/bin/tr` +sed -i 's/\/usr\/bin\/tr/$(command -v tr)/' tests/init.sh # upstream doesn't having the program name in the error message # but we do. We should keep it that way.