Files
hyperframes/packages
Miguel Angel Simon Sierra da0550e386 fix(engine): prefer ffmpeg.exe over a .cmd/.bat shim on Windows PATH
When HYPERFRAMES_FFMPEG_PATH is unset, findOnPath() auto-detects
ffmpeg/ffprobe via `where` (Windows) / `which` and used the FIRST
result. On Windows `where ffmpeg` frequently lists a .cmd/.bat wrapper
(npm/scoop/winget shims) ahead of the real .exe, and Node's spawn
without shell:true cannot execute a .cmd/.bat — it throws spawn EINVAL.
So render capture/encode AND audio muxing failed with "spawn EINVAL"
even though FFmpeg was installed; the reporter's own fix was to rename
the .cmd wrappers so ffmpeg.exe resolved first.

Two independent reports of this exact EINVAL (one explicitly tracing it
to `where` returning ffmpeg.cmd before ffmpeg.exe).

Fix: extract selectBinaryFromPathResults(output, platform) — on win32
it prefers the first directly-spawnable executable (.exe/.com) among
the results, falling back to the first result only when none is listed
(so a shell-runnable .cmd-only setup isn't dropped). Non-win32 is
unchanged (first result). Scoped to selection: the .cmd-only case
(would still EINVAL on spawn) is left for a separate shell-spawn change.

Test: selectBinaryFromPathResults unit tests — win32 prefers .exe over
a leading .cmd and over a .bat, falls back to the first when no exe is
listed, returns the first on non-win32, and undefined for empty output.
Existing env-resolution tests unchanged. Engine build green.
2026-07-04 18:04:56 -07:00
..
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-06-16 13:16:09 -04:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00
2026-07-04 22:33:27 +00:00