-
Notifications
You must be signed in to change notification settings - Fork 34
Well known config #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Well known config #291
Conversation
…ry-url>` in addition to the `--registry <registry-url>` long form
@@ -10,11 +10,21 @@ pub struct LogoutCommand { | |||
/// The common command options. | |||
#[clap(flatten)] | |||
pub common: CommonOptions, | |||
|
|||
/// The URL of the registry to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call out that this is an advanced option and plain registry
is preferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you mean "call out"?
I think either is OK. Just errors if you use both at the same time. Current look:
(base) > warg login -h
Manage auth tokens for interacting with a registry
Usage: warg login [OPTIONS] [URL]
Arguments:
[URL] The URL of the registry to use
Options:
--registry <URL> The URL of the registry to use
--config <CONFIG> The path to the client configuration file to use
--ignore-federation-hints Ignore federation hints
--auto-accept-federation-hints Auto accept federation hints
--keyring-backend <KEYRING_BACKEND> The backend to use for keyring access
-h, --help Print help (see more with '--help')
-V, --version Print version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm just confused; what is the purpose of these two different arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to support both warg login --registry <registry-url>
(to not break existing instructions but also migrate to warg login <registry-url>
.
Been trying, but clap
doesn't really support it best I can tell with the derive
args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK; maybe pick one of the two to #[arg(hide)]
and comment the reasoning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, with hide
.well-known
path, which required thewarg_client::FileSystemClient::new_with_config()
methods to beasync
;warg login <registry-url>
andwarg login --registry <registry-url>
(also forwarg logout
);bytecodealliance.org
; See discussionsFollow on work to respect HTTP cache headers.