install.sh: refuse Termux hosts and point at the APT package
check_platform accepted Termux as plain Linux, so `curl | bash` on a phone walked the source-install ladder: a glibc uv, a lock whose CPython is the bundled bionic build with no Android wheels, and on-device sdist builds. The signed APT package is the only supported Termux shape, so detect Termux the way the runtime does (TERMUX_VERSION or the com.termux PREFIX) and stop before any stage with `pkg install hermes-agent` and the setup docs URL. --json surfaces the reason in the stage frame.
This commit is contained in:
@@ -190,6 +190,12 @@ ensure_uv() {
|
||||
}
|
||||
|
||||
check_platform() {
|
||||
# Termux is Linux by uname, but this installer builds a glibc source
|
||||
# install the phone cannot run (no Android wheels in the lock). The
|
||||
# signed APT package is the only supported shape there.
|
||||
if [ -n "${TERMUX_VERSION:-}" ] || case "${PREFIX:-}" in *com.termux/files/usr*) true ;; *) false ;; esac; then
|
||||
fail "Termux is installed from its APT repository, not install.sh: pkg install hermes-agent (setup: https://hermes-agent.nousresearch.com/docs/getting-started/termux)"
|
||||
fi
|
||||
case "$(uname -s 2>/dev/null)" in
|
||||
Linux*) : ;;
|
||||
Darwin*) : ;;
|
||||
|
||||
Reference in New Issue
Block a user