fix: keep interactive OAuth setup-token inheriting stdin
The blanket DEVNULL pass muzzled run_oauth_setup_token()'s interactive 'claude setup-token' login, which needs inherited stdin to prompt the user. Revert that one call and replace the guard's brittle file:line whitelist with an inline 'noqa: subprocess-stdin' marker that travels with the code.
This commit is contained in:
parent
8bb60ff039
commit
2c1aaa9cba
2 changed files with 20 additions and 2 deletions
|
|
@ -1164,9 +1164,12 @@ def run_oauth_setup_token() -> Optional[str]:
|
|||
"Install it with: npm install -g @anthropic-ai/claude-code"
|
||||
)
|
||||
|
||||
# Run interactively — stdin/stdout/stderr inherited so user can interact
|
||||
# Run interactively — stdin/stdout/stderr inherited so the user can
|
||||
# complete the OAuth login prompt. Must keep inherited stdin; the TUI-EOF
|
||||
# concern does not apply to an interactive login the user explicitly
|
||||
# invokes. noqa: subprocess-stdin
|
||||
try:
|
||||
subprocess.run([claude_path, "setup-token"], stdin=subprocess.DEVNULL)
|
||||
subprocess.run([claude_path, "setup-token"])
|
||||
except (KeyboardInterrupt, EOFError):
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue