fix(install): warn loudly on non-x86_64 architectures before pulling images (#797)
Detects the host architecture early in the preflight sequence. On any architecture other than x86_64/amd64, prints a 5-line warning that NOMAD officially supports x86_64 only, points at PR #419, and sleeps 10 seconds before continuing. Ctrl+C aborts cleanly before any Docker work happens. Preserves the community/hacker path: ARM64 users running with QEMU binfmt_misc emulation can still let the install proceed. The change just stops the silent 2.7GB amd64 pull on architectures where it will not work, which leaves partial images and /opt/project-nomad/ debris that confuse first-time users. Reported in #782.
This commit is contained in:
parent
42fb4444dd
commit
cb129d2713
|
|
@ -86,6 +86,21 @@ check_is_debian_based() {
|
||||||
echo -e "${GREEN}#${RESET} This script is running on a Debian-based system.\\n"
|
echo -e "${GREEN}#${RESET} This script is running on a Debian-based system.\\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_is_x86_64() {
|
||||||
|
local arch
|
||||||
|
arch="$(uname -m)"
|
||||||
|
if [[ "${arch}" != "x86_64" && "${arch}" != "amd64" ]]; then
|
||||||
|
echo -e "${YELLOW}#${RESET} WARNING: Detected architecture '${arch}'. NOMAD officially supports x86_64 only.\\n"
|
||||||
|
echo -e "${YELLOW}#${RESET} ARM64/aarch64 support is tracked in PR #419 and is not yet ready.\\n"
|
||||||
|
echo -e "${YELLOW}#${RESET} Continuing on an unsupported architecture will likely fail and may leave\\n"
|
||||||
|
echo -e "${YELLOW}#${RESET} partial Docker images and files behind that you'll need to clean up manually.\\n"
|
||||||
|
echo -e "${YELLOW}#${RESET} Continuing in 10 seconds... press Ctrl+C now to abort.\\n"
|
||||||
|
sleep 10
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo -e "${GREEN}#${RESET} Architecture check passed (${arch}).\\n"
|
||||||
|
}
|
||||||
|
|
||||||
ensure_dependencies_installed() {
|
ensure_dependencies_installed() {
|
||||||
local missing_deps=()
|
local missing_deps=()
|
||||||
|
|
||||||
|
|
@ -539,6 +554,7 @@ success_message() {
|
||||||
|
|
||||||
# Pre-flight checks
|
# Pre-flight checks
|
||||||
check_is_debian_based
|
check_is_debian_based
|
||||||
|
check_is_x86_64
|
||||||
check_is_bash
|
check_is_bash
|
||||||
check_has_sudo
|
check_has_sudo
|
||||||
ensure_dependencies_installed
|
ensure_dependencies_installed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue