fix(windows): error on full index - use cmd.exe-compatible syntax (Fixes #324)#325
fix(windows): error on full index - use cmd.exe-compatible syntax (Fixes #324)#325hippus wants to merge 1 commit into
Conversation
|
Thank you, @hippus! 🙏 Clean diagnosis of a real Windows blocker (#324). You're exactly right: Since the PR branch predated the Landed in df38e33, which closes #324. Verified locally: build clean, all 3,617 tests pass (githistory pass runs fine). I also confirmed the double-quoted path is safe — |
The git-history popen command used `cd '%s' && git log ... 2>/dev/null`, which fails on Windows cmd.exe: single quotes are not recognized and /dev/null is not a valid path, producing "The filename, directory name, or volume label syntax is incorrect" at the git-history step of a full index. Switch to `git -C "%s" log ... 2>NUL` (POSIX: 2>/dev/null), which is valid on both cmd.exe and POSIX shells. Double-quoting the path is safe because cbm_validate_shell_arg already rejects ", $, backtick, backslash and the other active metacharacters before the command is built. Distilled from #325 onto current main (preserves the :%%ct commit-time field added since the PR branch). Closes #324.
The git-history popen command used `cd '%s' && git log ... 2>/dev/null`, which fails on Windows cmd.exe: single quotes are not recognized and /dev/null is not a valid path, producing "The filename, directory name, or volume label syntax is incorrect" at the git-history step of a full index. Switch to `git -C "%s" log ... 2>NUL` (POSIX: 2>/dev/null), which is valid on both cmd.exe and POSIX shells. Double-quoting the path is safe because cbm_validate_shell_arg already rejects ", $, backtick, backslash and the other active metacharacters before the command is built. Distilled from DeusData#325 onto current main (preserves the :%%ct commit-time field added since the PR branch). Closes DeusData#324.
Previously on full index under Windows there is an error after step 5:
The filename, directory name, or volume label syntax is incorrect.This PR fixes cmd.exe syntax