Files
SnowLuma/packages/runtime/launcher.sh

18 lines
424 B
Bash

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# Prefer bundled node when present; fall back to $PATH.
if [[ -x "./node" ]]; then
NODE_BIN="./node"
else
NODE_BIN="$(command -v node || true)"
if [[ -z "$NODE_BIN" ]]; then
echo "error: 'node' not found on PATH and no bundled ./node; install Node.js 24+." >&2
exit 127
fi
fi
"$NODE_BIN" ./check-node-version.cjs
exec "$NODE_BIN" ./index.mjs "$@"