Repository navigation
fix: prefer native command names outside Windows in render_demo - #552
Merged
calesthio merged 1 commit intoNov 8, 2026
Merged
Conversation
`find_command` tried Windows-only names first ("npx.cmd", "npm.cmd"),
so under WSL the Windows binaries exposed through /mnt/c PATH interop
won over the Linux ones. Python then failed to exec a batch file:
OSError: [Errno 8] Exec format error: '/mnt/c/Program Files/nodejs/npx.cmd'
This broke `make demo` for every WSL user — the very workaround the
README recommends to Windows users who lack `make`.
Filter .cmd/.exe candidates off Windows, matching the platform check
already used in tools/video/remotion_caption_burn.py:329. Windows
behaviour is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
calesthio
approved these changes
Nov 7, 2026
calesthio
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for the WSL command-resolution fix. The two-line filter cleanly integrates with current main and matches the existing native-platform convention. An independent mocked-PATH regression passed for Linux, macOS and Windows: non-Windows selects native npx without trying .cmd/.exe; Windows retains the original candidate order. I reviewed the full render_demo command-discovery call sites. No demo dependencies were installed or media rendered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
find_commandtries Windows-only names first ("npx.cmd","npm.cmd"). Under WSL, the Windows binaries exposed through/mnt/cPATH interop win over the Linux ones, and Python then fails to exec a batch file:This breaks
make demofor every WSL user — which is notable, since WSL is a common path for Windows users who lackmake.Fix
Filter
.cmd/.execandidates when not on Windows. This matches the platform check already used intools/video/remotion_caption_burn.py:329, so it follows an existing convention rather than introducing a new one. Windows behaviour is unchanged. One change point fixesnode,npmandnpxtogether.Testing
Ubuntu 26.04 under WSL2, Node v22.22.1, Python 3.14.4. Before: fails at
npxresolution. After:npx -> /usr/bin/npx,npm -> /usr/bin/npm, andrender_demo.pyrenders all three demos (1920x1080, 30 fps) with the Windows PATH intact and no workaround.🤖 Generated with Claude Code