From 3028224bd2f01c94d38ba40c95e534f06c7a1c81 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sat, 18 Apr 2026 23:01:26 +0800 Subject: [PATCH] backport browser flag default value support --- apps/gpauth/src/cli.rs | 4 +++- apps/gpclient/src/connect.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/gpauth/src/cli.rs b/apps/gpauth/src/cli.rs index 2d2848d..d9026a0 100644 --- a/apps/gpauth/src/cli.rs +++ b/apps/gpauth/src/cli.rs @@ -73,7 +73,9 @@ struct Cli { #[arg( long, - help = "The browser to use for authentication, e.g., `default`, `firefox`, `chrome`, `chromium`, `remote`, or the path to the browser executable. Use `remote` for headless servers" + help = "The browser to use for authentication, e.g., `default`, `firefox`, `chrome`, `chromium`, `remote`, or the path to the browser executable. Use `remote` for headless servers", + default_missing_value = "default", + num_args=0..=1 )] browser: Option, } diff --git a/apps/gpclient/src/connect.rs b/apps/gpclient/src/connect.rs index 404513e..5b21282 100644 --- a/apps/gpclient/src/connect.rs +++ b/apps/gpclient/src/connect.rs @@ -104,7 +104,9 @@ pub(crate) struct ConnectArgs { #[arg( long, - help = "Use the specified browser to authenticate, e.g., `default`, `firefox`, `chrome`, `chromium`, `remote`, or the path to the browser executable. Use `remote` for headless servers" + help = "Use the specified browser to authenticate, e.g., `default`, `firefox`, `chrome`, `chromium`, `remote`, or the path to the browser executable. Use `remote` for headless servers", + default_missing_value = "default", + num_args=0..=1 )] browser: Option, }