Skip to content

fix(install): quote PYTHON_PATH in version checks to handle spaces on macOS#10010

Closed
haoyousun60-create wants to merge 1 commit into
NousResearch:mainfrom
haoyousun60-create:fix/install-sh-macos-python-path-quoting
Closed

fix(install): quote PYTHON_PATH in version checks to handle spaces on macOS#10010
haoyousun60-create wants to merge 1 commit into
NousResearch:mainfrom
haoyousun60-create:fix/install-sh-macos-python-path-quoting

Conversation

@haoyousun60-create

Copy link
Copy Markdown

Summary

Wrap all $PYTHON_FOUND_VERSION assignments in double quotes to prevent word splitting when the Python path contains spaces (e.g. on macOS with uv-managed Python in ~/Library/Application Support/uv/...).

Root Cause

Lines 258, 267, 278, 287 used unquoted $PYTHON_PATH --version:

PYTHON_FOUND_VERSION=$($PYTHON_PATH --version 2>/dev/null)   # broken

When $PYTHON_PATH contains a space, bash word-splits it and set -e silently aborts the install script.

Fix

PYTHON_FOUND_VERSION="$($PYTHON_PATH --version 2>/dev/null)"  # correct

Testing

  • Verified on macOS with uv Python path containing spaces
  • install.sh no longer aborts prematurely

Closes #10009

… macOS

Lines with unquoted $PYTHON_PATH --version cause 'set -e' to silently
abort when uv returns a path with spaces (e.g. ~/Library/Application
Support/uv/...). Wrap all $PYTHON_FOUND_VERSION assignments in double
quotes to prevent word splitting.

Fixes: NousResearch/issues/10009
@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #13001 #13001 which uses @PStarH's more thorough fix (inner+outer quoting plus $UV_CMD). Thanks @haoyousun60-create!

@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)

3 participants