mirror of
https://github.com/openai/codex.git
synced 2026-11-06 16:32:29 +00: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:
1 parent
6db6de031a
commit
8cd7f20b48
1 file changed
+2
@@ -287,6 +287,8 @@ struct LoginCommand {
|
|||||||
|
|
||||||
#[arg(
|
#[arg(
|
||||||
long = "api-key",
|
long = "api-key",
|
||||||
|
num_args = 0..=1,
|
||||||
|
default_missing_value = "",
|
||||||
value_name = "API_KEY",
|
value_name = "API_KEY",
|
||||||
help = "(deprecated) Previously accepted the API key directly; now exits with guidance to use --with-api-key",
|
help = "(deprecated) Previously accepted the API key directly; now exits with guidance to use --with-api-key",
|
||||||
hide = true
|
hide = true
|
||||||
|
|||||||
Reference in new issue
Block a user