Skip to content

fix: correct detection of wrapper shim on Windows/venv#5

Merged
mldangelo merged 4 commits intomainfrom
fix/windows-shim-detection
Jan 6, 2026
Merged

fix: correct detection of wrapper shim on Windows/venv#5
mldangelo merged 4 commits intomainfrom
fix/windows-shim-detection

Conversation

@mldangelo
Copy link
Member

This fixes a bug where the Python wrapper fails to identify the existing promptfoo executable as itself (the shim) when running in a virtual environment on Windows (or via uv), causing it to fall back to npx (which then failed) or loop.

The fix adds a check to see if the found executable is in the same directory as the Python interpreter when running in a venv, which correctly identifies the shim.

@mldangelo mldangelo merged commit 79fbc2a into main Jan 6, 2026
10 checks passed
@mldangelo mldangelo deleted the fix/windows-shim-detection branch February 24, 2026 23:22
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.

1 participant