Only to busybox to /bin/sh in nix-portable

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
This commit is contained in:
2026-03-05 17:00:20 +01:00
parent 79fdfc6c0e
commit e7b3f972b0

View File

@@ -329,13 +329,6 @@ let
fi
done
# if we're on a nixos, the /bin/sh symlink will point
# to a /nix/store path which doesn't exit inside the wrapped env
# we fix this by binding busybox/bin to /bin
if test -s /bin/sh && [[ "\$(realpath /bin/sh)" == /nix/store/* ]]; then
toBind="\$toBind \$dir/busybox/bin /bin"
fi
# provide /bin/sh via the shipped busybox
toBind="\$toBind \$dir/busybox/bin/busybox /bin/sh"