fix: prevent silent abort in piped install when interactive prompts fail (#69)#72
Merged
teknium1 merged 2 commits intoNousResearch:mainfrom Feb 27, 2026
Merged
Conversation
…ail (NousResearch#69) Root cause: the install script uses `set -e` (exit on error) and `read -p` for interactive prompts. When running via `curl | bash`, stdin is a pipe (not a terminal), so `read -p` hits EOF and returns exit code 1. Under `set -e`, this silently aborts the entire script before hermes is installed. Fix: detect non-interactive mode using `[ -t 0 ]` (standard POSIX test for terminal stdin) and skip all interactive prompts when running in piped mode. Clear messages are shown instead, telling the user what to run manually. Changes: - Add IS_INTERACTIVE flag at script start ([ -t 0 ] check) - Guard sudo package install prompt (the direct cause of NousResearch#69) - Guard setup wizard (calls interactive hermes setup) - Guard WhatsApp pairing and gateway install prompts All other prompts use the same read -p pattern and would fail the same way in piped mode, so they are all guarded for completeness. Closes NousResearch#69
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69
Problem
The install script silently aborts when run via
curl | bashon systems wheresudorequires a password (e.g. fresh Debian 12 without ripgrep).Root cause: The script uses
set -e(line 16) which exits on any non-zero return code. When running viacurl | bash, stdin is a pipe — not a terminal. Theread -pcommand at line 471 (sudo package install prompt) hits EOF on the piped stdin and returns exit code 1. Underset -e, this silently kills the entire script beforeclone_repo,setup_path, etc. ever run.Result:
uvgets installed buthermesis never set up. No error message is shown.Reproduction
Fix
Detect non-interactive mode at script start using the standard POSIX test
[ -t 0 ](checks if stdin is a terminal). When running in piped mode, skip all interactive prompts and show clear messages telling the user what to run manually.This is the same approach used by
rustup,nvm, andoh-my-zshinstall scripts.Guarded prompts
install_system_packagessudo apt install ...command to run manuallyrun_setup_wizardhermes setuphermes setupto run after installmaybe_start_gatewayhermes whatsappto run latermaybe_start_gatewayhermes gateway installto run laterThe sudo prompt (row 1) is the direct cause of #69. The other three use the same
read -ppattern and would fail identically in piped mode, so they are guarded for completeness.Verification
Scope
Single file:
scripts/install.sh. No changes to Python code or agent behavior. Normal interactive installs (bash install.sh) are completely unaffected — the prompts work exactly as before when stdin is a terminal.