Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -788,17 +788,6 @@ install_apt_packages() {
# Install bazelisk
install_npm_package "bazelisk" "bazelisk" "@aspect/bazelisk"

# Install piper-tts (text-to-speech)
prompt_ai_install
if [[ "$INSTALL_AI" == true ]] && ! command -v piper >/dev/null 2>&1; then
if command -v pip3 >/dev/null 2>&1; then
echo "Installing piper-tts..."
pip3 install --user piper-tts 2>/dev/null || pip3 install --user --break-system-packages piper-tts || echo " Warning: Failed to install piper-tts (network issue?)"
else
echo "Skipping piper-tts (pip3 not installed)"
fi
fi

# Create fd alias (Debian/Ubuntu installs as fdfind)
if command -v fdfind >/dev/null 2>&1 && ! command -v fd >/dev/null 2>&1; then
sudo ln -sf "$(which fdfind)" /usr/local/bin/fd
Expand Down Expand Up @@ -834,6 +823,9 @@ install_linux_common_packages() {
echo "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh || echo " Warning: Failed to install uv (network issue?)"
fi
# The uv installer only edits shell rc files; expose ~/.local/bin to this run so
# update_packages can find uv (and the tools it installs) on a first bootstrap.
[[ -d "$HOME/.local/bin" && ":$PATH:" != *":$HOME/.local/bin:"* ]] && export PATH="$HOME/.local/bin:$PATH"

# Install atuin (shell history)
if ! command -v atuin >/dev/null 2>&1; then
Expand Down Expand Up @@ -952,11 +944,20 @@ update_packages() {
fi
fi

# Update pip packages (no safe "update all" — list managed packages explicitly)
# Install/upgrade piper-tts (text-to-speech) as an isolated uv tool, pinned to
# Python 3.13. A pip install into the system Python breaks whenever Homebrew
# bumps python@3: the old interpreter is removed (leaving a dangling `piper`
# shebang) and onnxruntime lags new Python releases by months, so the
# reinstall has no wheels to resolve. uv fetches a managed 3.13 if needed.
prompt_ai_install
if [[ "$INSTALL_AI" == true ]] && command -v pip3 >/dev/null 2>&1; then
echo "Updating pip packages..."
pip3 install --upgrade piper-tts 2>/dev/null || pip3 install --upgrade --break-system-packages piper-tts 2>/dev/null || true
if [[ "$INSTALL_AI" == true ]]; then
if command -v uv >/dev/null 2>&1; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] On a fresh Linux/SteamOS machine, uv may not be visible to this process yet. install_linux_common_packages installs uv with curl … astral.sh/uv/install.sh | sh, which puts it in ~/.local/bin. The installer edits shell rc files but not this process's PATH, and bootstrap.sh never adds ~/.local/bin to PATH itself. On a first ./bootstrap.sh -p, from a shell where ~/.local/bin wasn't on PATH (Ubuntu's ~/.profile only adds it if the dir existed at login), command -v uv fails here and the run prints Skipping piper-tts (uv not installed). The old apt path installed piper on that first run via pip3 --user, so this is a small first-run regression. It fixes itself on the next run.

Cheap fix: after the uv install in install_linux_common_packages, mirror the ~/.cargo/env pattern used for rustup, e.g. [[ -d "$HOME/.local/bin" && ":$PATH:" != *":$HOME/.local/bin:"* ]] && export PATH="$HOME/.local/bin:$PATH". Or have this check fall back to $HOME/.local/bin/uv.

echo "Installing/updating piper-tts..."
# --force: take over a `piper` entrypoint left by an earlier pip --user install

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] --force only takes over entrypoints in uv's own bin dir (~/.local/bin). On the macOS machine that hit this bug, the pip-installed /opt/homebrew/bin/piper, whose shebang points to the removed 3.14 interpreter, is left in place. It's harmless for interactive shells because .exports puts ~/.local/bin first. Anything with a Homebrew-only PATH, such as a LaunchAgent or a non-login hook, would still resolve to the broken one. You could optionally remove it in cleanup_legacy_configs, but only when it's a regular file whose shebang interpreter no longer exists, so a working install is never touched.

uv tool install --upgrade --force --python 3.13 piper-tts || echo " Warning: Failed to install piper-tts"
else
echo "Skipping piper-tts (uv not installed)"
fi
fi

echo "Package updates complete."
Expand Down
Loading