Unpack the bundled Node tarball for the machine's architecture

An aarch64 ISO bundles node-v*-linux-arm64.tar.gz, and mise-work.sh
looked for node-v*-linux-x64.tar.gz on every machine. An offline install
on aarch64 stopped at its last step: "Error: bundled Node.js tarball
missing from /opt/packages".

The name now follows uname -m. x86_64 looks for the same file as before.
This is the change the n1x branch already carries, from Spencer Bull's
6d022e36.
This commit is contained in:
Emir Beganovic committed 2026-10-09 01:07:03 +02:00
1 parent 50d687a1f2
commit 057681b33c
1 file changed
+7 -2
+7 -2
View File
@@ -12,7 +12,12 @@ case ${OMARCHY_SETUP_CONTEXT:-runtime} in
esac
if [[ -n $NODE_PACKAGE_DIR ]]; then
NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1)
# The ISO bundles the tarball for its own architecture.
case $(uname -m) in
aarch64) NODE_PLATFORM=linux-arm64 ;;
*) NODE_PLATFORM=linux-x64 ;;
esac
NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-$NODE_PLATFORM.tar.gz" -type f 2>/dev/null | head -n1)
if [[ -z $NODE_TARBALL ]]; then
if [[ ${OMARCHY_SETUP_CONTEXT:-} == "provision-owner" ]]; then
# A factory snapshot predating the bundled tarball may not have it staged.
@@ -24,7 +29,7 @@ if [[ -n $NODE_PACKAGE_DIR ]]; then
exit 1
fi
else
NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/')
NODE_VERSION=$(basename "$NODE_TARBALL" | sed "s/node-v\(.*\)-$NODE_PLATFORM.tar.gz/\1/")
NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION"
mkdir -p "$NODE_INSTALL_DIR"