Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit df57e6f

Browse files
don't ask the "unsafe" question in noninteractive login
caller has to use --unsafe or --allow
1 parent 6373b76 commit df57e6f

File tree

1 file changed

+7
-7
lines changed
  • packages/jumpstarter-cli/jumpstarter_cli

1 file changed

+7
-7
lines changed

packages/jumpstarter-cli/jumpstarter_cli/login.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ async def login( # noqa: C901
8383

8484
if kind.startswith("client"):
8585
if unsafe is None:
86-
unsafe = click.confirm("Allow unsafe driver client imports?")
87-
if unsafe is False and allow == "":
88-
if nointeractive:
89-
raise click.UsageError("Allowed driver packages are required in non-interactive mode.")
90-
allow = click.prompt(
91-
"Enter a comma-separated list of allowed driver packages (optional)", default="", type=str
92-
)
86+
unsafe = False if nointeractive else click.confirm("Allow unsafe driver client imports?")
87+
if unsafe is False and allow == "":
88+
if nointeractive:
89+
raise click.UsageError("--allow TEXT or --unsafe is required in non-interactive mode.")
90+
allow = click.prompt(
91+
"Enter a comma-separated list of allowed driver packages (optional)", default="", type=str
92+
)
9393

9494
if kind.startswith("client"):
9595
config = ClientConfigV1Alpha1(

0 commit comments

Comments
 (0)