Files
gui-video-clipper/chat-summaries/2026-09-22_14-10-fix-pyenv-pot-provider-v011-summary.md
cottongin 9499d776fd fix: about dialog, cache paths, keyframes, reprocess always uses low-res
- Replace native macOS About menu with custom Svelte dialog via Tauri event
- Inline SVG icon in AboutDialog (fixes broken image in webview)
- Align cache directory with Tauri $APPDATA, add to asset protocol scope
- Fix ffprobe 8.x keyframe parsing (skip_frame nokey, flexible parser)
- Copy caption files into cache dir when outside cache path
- Add -y flag to ffmpeg thumbnail extraction (prevent hang on re-extract)
- Reprocess always uses preview (low-res) file, never HQ export
- Prefer cached preview file for analysis even when HQ is cached
- Guard upgrade toast when already on HQ

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:16:00 -04:00

2.7 KiB

Fix pyenv pot-provider detection & version bump to v0.1.1

Task Description

The built .app bundle was not detecting the bgutil-ytdlp-pot-provider yt-dlp plugin, even after the initial fix_path_env() implementation that added Homebrew paths to PATH. After fixing, bump version to 0.1.1, commit, push, and tag.

Root Cause

fix_path_env() added /opt/homebrew/bin to PATH, which found Homebrew's yt-dlp binary. However, the pot-provider plugin was pip-installed under pyenv's Python (~/.pyenv/versions/3.12.6/lib/python3.12/site-packages/yt_dlp_plugins). Homebrew's yt-dlp uses a different Python runtime with no plugin directories ([debug] Plugin directories: none). The pyenv shim for yt-dlp correctly resolves to pyenv's Python where the plugin is installed.

Changes Made

src-tauri/src/lib.rs — Enhanced fix_path_env()

  • Added ~/.pyenv/shims to PATH before Homebrew paths so pyenv-managed yt-dlp (with pip plugins) takes priority
  • Sets PYENV_ROOT env var when pyenv exists so shims resolve correctly
  • Added ~/.nvm/versions/node/<latest>/bin discovery for nvm-managed Node.js
  • Added ~/.deno/bin to handled paths
  • Restructured the function for clarity: home-relative paths first, then system-wide paths

Version Bump (via scripts/bump-version.sh 0.1.1)

  • VERSION → 0.1.1
  • package.json → 0.1.1
  • src-tauri/Cargo.toml → 0.1.1
  • src-tauri/tauri.conf.json → 0.1.1
  • src-tauri/Cargo.lock regenerated

Git Operations

  • Committed: d46973a on master
  • Pushed to origin/master
  • Tagged: v0.1.1 (annotated, pushed)

Verification

  • npm run check — 0 errors, 0 warnings
  • npm test — 5 files, 31 tests passed
  • cargo build — clean compile
  • npm run release — built .app and .dmg successfully
  • Launched .app bundle — all 4 dependencies detected (ffmpeg, yt-dlp, JS runtime, bgutil-ytdlp-pot-provider)

Lessons Learned

  • Python version managers (pyenv) create shim binaries that dispatch to a specific Python version. When a tool like yt-dlp is both Homebrew-installed and pyenv/pip-installed, PATH ordering determines which one runs — and they can have different plugin directories.
  • Simulating the .app environment with env -i HOME="$HOME" PATH="<minimal>" yt-dlp -v was the key diagnostic step that instantly reproduced the issue (Plugin directories: none vs Plugin directories: ~/.pyenv/...).
  • The bump-version.sh script works correctly for multi-file version bumps across VERSION, package.json, Cargo.toml, tauri.conf.json, and Cargo.lock.

Follow-up Items

  • The npm pkg set command in bump-version.sh produces a cosmetic JSON error with --json flag before falling back; could be cleaned up.