Bug Report
Description
The install-miner.sh script claims to support macOS (Intel/M2) in the header comments, but the detect_platform() function doesn't validate the architecture on Darwin systems.
Current Behavior
detect_platform() {
local os=$(uname -s)
local arch=$(uname -m)
case "$os" in
Linux)
[ "$arch" != "aarch64" ] && [ "$arch" != "x86_64" ] && [ "$arch" != "ppc64le" ] && { echo -e "${RED}[!] Unsupported architecture: $arch (Supported: aarch64, x86_64, ppc64le)${NC}"; exit 1; }
...
Darwin) echo "macos" ;; # <-- No arch check here!
*) echo "unknown"; exit 1 ;;
esac
}
Expected Behavior
Should validate that macOS architecture is either x86_64 (Intel) or arm64 (Apple Silicon/M1/M2), and reject unsupported architectures like i386 on older macOS.
Suggested Fix
Darwin)
[ "$arch" != "x86_64" ] && [ "$arch" != "arm64" ] && { echo -e "${RED}[!] Unsupported macOS architecture: $arch (Supported: x86_64, arm64)${NC}"; exit 1; }
echo "macos" ;;
Impact
- Low severity: Currently all macOS systems will work since Apple only ships x86_64 and arm64
- But the script is inconsistent with its Linux validation behavior
- Could cause confusion if someone tries to run on an ancient 32-bit Mac
Environment
- File:
install-miner.sh
- Line: ~65 (detect_platform function)
- Version: 1.1.0
Bug Report
Description
The
install-miner.shscript claims to support macOS (Intel/M2) in the header comments, but thedetect_platform()function doesn't validate the architecture on Darwin systems.Current Behavior
Expected Behavior
Should validate that macOS architecture is either
x86_64(Intel) orarm64(Apple Silicon/M1/M2), and reject unsupported architectures likei386on older macOS.Suggested Fix
Darwin) [ "$arch" != "x86_64" ] && [ "$arch" != "arm64" ] && { echo -e "${RED}[!] Unsupported macOS architecture: $arch (Supported: x86_64, arm64)${NC}"; exit 1; } echo "macos" ;;Impact
Environment
install-miner.sh