mkosi: Use bash to execute command -v

command is only an executable on Fedora due to a downstream patch,
on Arch for example it's only a builtin so we have to use bash to
execute command -v to get proper results on Arch.
This commit is contained in:
Daan De Meyer
2024-11-24 16:47:18 +01:00
parent 6fd5df6005
commit 506403f561
+2 -2
View File
@@ -93,7 +93,7 @@ wrap=(
)
for bin in "${wrap[@]}"; do
if ! mkosi-chroot command -v "$bin" >/dev/null; then
if ! mkosi-chroot bash -c "command -v $bin" >/dev/null; then
continue
fi
@@ -103,7 +103,7 @@ for bin in "${wrap[@]}"; do
enable_lsan=0
fi
target="$(mkosi-chroot command -v "$bin")"
target="$(mkosi-chroot bash -c "command -v $bin")"
mv "$BUILDROOT/$target" "$BUILDROOT/$target.orig"