Skip to content

fix(cli): prevent update crash in non-TTY environments#3094

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-7d7ac769
Mar 26, 2026
Merged

fix(cli): prevent update crash in non-TTY environments#3094
teknium1 merged 1 commit intomainfrom
hermes/hermes-7d7ac769

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

cmd_update calls input() unconditionally during config migration. In headless environments (Telegram gateway, systemd), there's no TTY — input() throws EOFError and the update crashes, preventing the gateway from restarting.

Guard with sys.stdin.isatty(), default to skipping the migration prompt when non-interactive.

Salvaged from PR #2850 by @devorun. Closes #2848.

cmd_update calls input() unconditionally during config migration.
In headless environments (Telegram gateway, systemd), there's no TTY,
so input() throws EOFError and the update crashes.

Guard with sys.stdin.isatty(), default to skipping the migration
prompt when non-interactive.

Salvaged from PR #2850 by devorun. Closes #2848.
@teknium1 teknium1 merged commit 41081d7 into main Mar 26, 2026
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
…3094)

cmd_update calls input() unconditionally during config migration.
In headless environments (Telegram gateway, systemd), there's no TTY,
so input() throws EOFError and the update crashes.

Guard with sys.stdin.isatty(), default to skipping the migration
prompt when non-interactive.

Salvaged from PR NousResearch#2850 by devorun. Closes NousResearch#2848.
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
…3094)

cmd_update calls input() unconditionally during config migration.
In headless environments (Telegram gateway, systemd), there's no TTY,
so input() throws EOFError and the update crashes.

Guard with sys.stdin.isatty(), default to skipping the migration
prompt when non-interactive.

Salvaged from PR NousResearch#2850 by devorun. Closes NousResearch#2848.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant