mirror of
https://github.com/usestrix/strix.git
synced 2026-09-07 08:25:56 +00:00
fix(login): skip the scope prompt when stdin is not a terminal
This commit is contained in:
parent
04a77e50e7
commit
baf0ff41fd
1 changed files with 3 additions and 1 deletions
|
|
@ -287,7 +287,9 @@ def _complete_selection(
|
|||
|
||||
chosen_org = _choose_workspace(console, organizations, workspace)
|
||||
role = str(chosen_org.get("role") or "admin")
|
||||
chosen_scopes = scopes if scopes else _choose_scopes(console, catalog, role)
|
||||
chosen_scopes = scopes
|
||||
if chosen_scopes is None and sys.stdin.isatty():
|
||||
chosen_scopes = _choose_scopes(console, catalog, role)
|
||||
|
||||
body: dict[str, Any] = {
|
||||
"selection_token": selection_token,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue