Skip to content

Commit 35b2ea9

Browse files
committed
Install binfmt-support if update-binfmts is not available
ubuntu-24.04 on GitHub-hosted runners don't have `update-binfmts` installed. Resolves #15
1 parent 2778515 commit 35b2ea9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎setup-alpine.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ if needs_emulator "$INPUT_ARCH"; then
195195

196196
group "Install $qemu_cmd emulator"
197197

198+
# TODO: Consider replacing it with a simple shell script to speed-up
199+
# the installation.
200+
if ! command -V update-binfmts >/dev/null; then
201+
info 'Installing binfmt-support from Ubuntu repository'
202+
apt-get install --no-install-recommends -y binfmt-support
203+
fi
204+
198205
if update-binfmts --display $qemu_cmd >/dev/null 2>&1; then
199206
info "$qemu_cmd is already installed on the host system"
200207

0 commit comments

Comments
 (0)