From fdcceddfa92c61766a6434da510af31ddb33cd7b Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Mon, 24 Nov 2025 00:05:13 +0900 Subject: [PATCH] build-gnu.sh: Remove which for portability (#9452) --- 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 ebfa74aa0..9fbc445b9 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -348,8 +348,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.