1 Commits

Author SHA1 Message Date
Teknium 5e8d25d7e7 fix(cli): --in accepts Git Bash / MSYS-style paths on Windows (#85865)
* fix(cli): --in accepts Git Bash / MSYS paths on Windows

Under Git Bash, 'hermes chat --in ~' reaches the CLI as /c/Users/<user>
(the shell expands ~ to an MSYS POSIX path; MSYS2 argument conversion
is disabled for native executables), and the isdir check failed with
'--in directory not found: /c/Users/...'. Route the value through the
existing _msys_to_windows_path translator (MSYS + Cygwin + WSL drive
spellings; no-op elsewhere) before expanduser/abspath.

Hit live: Bot Mode's agent-messaging protocol delivers with --in ~, so
every bot-to-bot send from a Git Bash-driven agent failed on Windows.

Tests pin both the translation cases and (source-level) the call site
actually using it.

* test: assert the MSYS translation, not platform abspath

The prior assertion ran os.path.abspath on the translated Windows path,
which on the Linux CI runner (posixpath) treats 'C:\Users\alice' as
relative and prepends the runner cwd. Pin the translation output and
ntpath absoluteness instead — same contract, platform-independent.
2026-08-13 23:41:49 -07:00