Skip to content

fix(cli): use CON device instead of /dev/tty on Windows - #594

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56722
Open

fix(cli): use CON device instead of /dev/tty on Windows#594
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56722

Conversation

@hashbender

Copy link
Copy Markdown
Owner

What does this PR do?

Fix a Windows-specific compatibility issue where _reset_terminal_input_modes_on_exit() fails with FileNotFoundError because Windows doesn't have /dev/tty device.

Related Issue

This is a split from PR NousResearch#54933 (closed). The local.py changes were identified as duplicates of NousResearch#49460 and NousResearch#54235, but this cli.py fix is independent and not covered by those PRs.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • cli.py (line ~1176): Added platform check in _reset_terminal_input_modes_on_exit() to use CON device on Windows instead of /dev/tty

How to Test

  1. On Windows 11, redirect stdout and exit TUI
  2. Verify no FileNotFoundError is raised
  3. Verify terminal state is properly reset after Hermes exits
  4. Verify /dev/tty still works on Linux/macOS

Checklist

Code

Documentation & Housekeeping


Note: Part of this code was AI-assisted, reviewed and tested by human.


Mirror-of: NousResearch#56722
NousResearch#56722

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant