Skip to content

fix: quote $PYTHON_PATH in install.sh to handle paths with spaces#10118

Closed
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-10009-install-sh-python-path-quoting
Closed

fix: quote $PYTHON_PATH in install.sh to handle paths with spaces#10118
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-10009-install-sh-python-path-quoting

Conversation

@nightq

@nightq nightq commented Apr 15, 2026

Copy link
Copy Markdown

Summary

Fixes silent installation failure on macOS when Python path contains spaces (e.g., ~/Library/Application Support/uv/...).

Root Cause

The check_python() function in scripts/install.sh uses unquoted variable expansion ($PYTHON_PATH) inside command substitutions. With set -e enabled, paths with spaces cause the shell to split the path and attempt to execute a non-existent command, triggering silent exit.

Fix

Quoted all 4 instances of $PYTHON_PATH inside command substitutions:

  • Line 258: $PYTHON_FOUND_VERSION=$("$PYTHON_PATH" --version)
  • Line 267: same fix
  • Line 278: same fix
  • Line 287: same fix

Test Plan

  • Run bash install.sh on macOS with Python installed via uv (path contains spaces)
  • Verify installation completes without silent failure

Closes #10009

Fixes NousResearch#10009

Root cause: Unquoted variable expansion in check_python() causes silent failure
when Python path contains spaces (e.g., ~/Library/Application Support/uv/...)
Fix: Quote all $PYTHON_PATH usages inside command substitutions
@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #13001 #13001 which fixes the same issue with more thorough quoting. Thanks @nightq!

@teknium1 teknium1 closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: install.sh fails on macOS due to unquoted spaces in Python path (uv)

2 participants