Skip to content

fix(cli): normalize Hermes home display separators - #49974

Closed
BryanTegomoh wants to merge 1 commit into
NousResearch:mainfrom
BryanTegomoh:bryan/fix-doctor-windows-env-path
Closed

fix(cli): normalize Hermes home display separators#49974
BryanTegomoh wants to merge 1 commit into
NousResearch:mainfrom
BryanTegomoh:bryan/fix-doctor-windows-env-path

Conversation

@BryanTegomoh

Copy link
Copy Markdown

Normalizes home-relative Hermes display paths with forward slashes before applying the ~/ placeholder. That keeps hermes doctor from printing mixed separators like ~/AppData\Local\hermes/.env on Windows.

Changes:

  • Use as_posix() when formatting home-relative display paths.
  • Add a regression test using PureWindowsPath to cover the doctor .env suffix path.

Testing:

  • scripts/run_tests.sh tests/test_hermes_constants.py
  • scripts/run_tests.sh tests/hermes_cli/test_doctor.py
  • .venv/bin/python -m ruff check hermes_constants.py tests/test_hermes_constants.py
  • .venv/bin/python scripts/check-windows-footguns.py hermes_constants.py tests/test_hermes_constants.py

Fixes #49500

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #49507 — identical one-line fix at the same site (display_hermes_home() in hermes_constants.py:327, switching str(home.relative_to(...)) to .as_posix()), both closing #49500. #49507 is open and was filed earlier (2026-06-20). Consolidating there.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Windows regression fix. Current main still has the mixed-separator source at hermes_constants.py:646, and the proposed .as_posix() conversion directly corrects the value consumed by hermes doctor at hermes_cli/doctor.py:715.

Problems

  • Two fallback helpers that state they mirror this display contract still use str(home.relative_to(Path.home())): skills/productivity/google-workspace/scripts/_hermes_home.py:40 and plugins/platforms/google_chat/oauth.py:90. They do not affect doctor when the core helper imports, but can emit the same mixed form in fallback environments.

Suggested changes

  • Normalize those fallback tails with .as_posix(), or track them as a narrowly scoped follow-up if this change intentionally remains limited to the core helper.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
@BryanTegomoh

Copy link
Copy Markdown
Author

Thanks for flagging the duplicate. #49507 predates this PR and contains the same core change, so I’m closing this one to keep review consolidated there.

Sorry to hear about your dog. Stay strong. @teknium1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes doctor shows mixed POSIX and Windows path style in .env message

3 participants