Skip to content

Commit

Permalink
mkosi: Use bash to execute command -v
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DaanDeMeyer committed Nov 24, 2024
1 parent 6fd5df6 commit 506403f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkosi.sanitizers/mkosi.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"

Expand Down

0 comments on commit 506403f

Please sign in to comment.