fix(auth): use default label silently in non-interactive environments - #10475
Closed
ygd58 wants to merge 2 commits into
Closed
fix(auth): use default label silently in non-interactive environments#10475ygd58 wants to merge 2 commits into
ygd58 wants to merge 2 commits into
Conversation
hermes auth add <provider> --auth-type api_key unconditionally called input() for the label prompt, raising EOFError in non-interactive environments (CI, pipes, scripts, automation). The command already computed a deterministic fallback label (api-key-N) so there is no need to block when stdin is not a TTY. Fix: gate the input() call on sys.stdin.isatty(). When stdin is not a TTY, fall back to default_label silently and proceed. Fixes NousResearch#10468
Contributor
|
Thanks for the fix, @ygd58! This is an automated hermes-sweeper review. This change was independently merged the same day this PR was opened — the identical
Closing as implemented on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10468
Gate the input() call on sys.stdin.isatty(). Non-interactive environments use default_label silently instead of crashing with EOFError.