mirror of
https://github.com/openai/codex.git
synced 2026-04-30 11:21:34 +03:00
Fix deprecated login --api-key parsing (#16658)
Addresses #16655 Problem: `codex login --api-key` failed in Clap before Codex could show the deprecation guidance. Solution: Allow the hidden `--api-key` flag to parse with zero or one values so both forms reach the `--with-api-key` message.
This commit is contained in:
@@ -287,6 +287,8 @@ struct LoginCommand {
|
||||
|
||||
#[arg(
|
||||
long = "api-key",
|
||||
num_args = 0..=1,
|
||||
default_missing_value = "",
|
||||
value_name = "API_KEY",
|
||||
help = "(deprecated) Previously accepted the API key directly; now exits with guidance to use --with-api-key",
|
||||
hide = true
|
||||
|
||||
Reference in New Issue
Block a user