Bug Description
The installer (scripts/install.sh) silently aborts during the check_python() function on macOS when uv python find returns a path containing spaces.
On macOS, uv installs and manages Python under ~/Library/Application Support/uv/python/.... The space in "Application Support" causes the script to fail with exit code 127 and no error message (due to set -e), making it very difficult to diagnose.
Steps to Reproduce
- On macOS, have Python 3.11 managed by
uv (installed to ~/Library/Application Support/uv/python/cpython-3.11.x-macos-aarch64-none/bin/python3.11)
- Ensure Python 3.11 is not available at a path without spaces (e.g., not in
/opt/homebrew/bin/)
- Run:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
- Installer prints "Checking Python 3.11..." and then silently exits with code 127
Expected Behavior
The installer should detect the uv-managed Python and continue with the installation.
Actual Behavior
The script silently aborts after printing → Checking Python 3.11... with exit code 127. No error message is shown because set -e causes immediate termination.
Root Cause Analysis
In scripts/install.sh, the check_python() function on lines 218 and 227 uses $PYTHON_PATH without quotes:
# Line 217-218
PYTHON_PATH=$($UV_CMD python find "$PYTHON_VERSION")
PYTHON_FOUND_VERSION=$($PYTHON_PATH --version 2>/dev/null) # ← unquoted
# Line 226-227
PYTHON_PATH=$($UV_CMD python find "$PYTHON_VERSION")
PYTHON_FOUND_VERSION=$($PYTHON_PATH --version 2>/dev/null) # ← unquoted
When uv python find 3.11 returns a path like:
/Users/username/Library/Application Support/uv/python/cpython-3.11.13-macos-aarch64-none/bin/python3.11
Bash word-splits the unquoted variable on the space, attempting to execute /Users/username/Library/Application as a command → command not found → exit 127 → set -e aborts the entire script.
Proposed Fix
Quote $PYTHON_PATH on lines 218 and 227:
PYTHON_FOUND_VERSION=$("$PYTHON_PATH" --version 2>/dev/null)
This is a two-character fix (add quotes in two places). I verified this locally — patching these two lines allows the full installation to complete successfully.
Environment
- OS: macOS 15.7.3 (Sequoia, Apple Silicon)
- Python: 3.11.13 (uv-managed)
- Hermes Version: 0.4.0 (2026.3.23) — installed via patched script
- uv: 0.7.21
- Affected Component: Setup / Installation
- Platform: N/A (CLI only)
Disclosure: This issue was identified, diagnosed, and written by an AI agent (Claude, Anthropic) and reviewed by a human before submission.
Bug Description
The installer (
scripts/install.sh) silently aborts during thecheck_python()function on macOS whenuv python findreturns a path containing spaces.On macOS,
uvinstalls and manages Python under~/Library/Application Support/uv/python/.... The space in "Application Support" causes the script to fail with exit code 127 and no error message (due toset -e), making it very difficult to diagnose.Steps to Reproduce
uv(installed to~/Library/Application Support/uv/python/cpython-3.11.x-macos-aarch64-none/bin/python3.11)/opt/homebrew/bin/)curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bashExpected Behavior
The installer should detect the uv-managed Python and continue with the installation.
Actual Behavior
The script silently aborts after printing
→ Checking Python 3.11...with exit code 127. No error message is shown becauseset -ecauses immediate termination.Root Cause Analysis
In
scripts/install.sh, thecheck_python()function on lines 218 and 227 uses$PYTHON_PATHwithout quotes:When
uv python find 3.11returns a path like:Bash word-splits the unquoted variable on the space, attempting to execute
/Users/username/Library/Applicationas a command →command not found→ exit 127 →set -eaborts the entire script.Proposed Fix
Quote
$PYTHON_PATHon lines 218 and 227:PYTHON_FOUND_VERSION=$("$PYTHON_PATH" --version 2>/dev/null)This is a two-character fix (add quotes in two places). I verified this locally — patching these two lines allows the full installation to complete successfully.
Environment