Skip to content
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

Support cargo owner add #4352

Open
Manishearth opened this issue Aug 2, 2017 · 2 comments · May be fixed by docopt/docopt.rs#227
Open

Support cargo owner add #4352

Manishearth opened this issue Aug 2, 2017 · 2 comments · May be fixed by docopt/docopt.rs#227
Labels
Command-owner S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

Comments

@Manishearth
Copy link
Member

Manishearth commented Aug 2, 2017

$ cargo owner add foo
error: Invalid arguments.

Usage:
    cargo owner [options] [<crate>]
$ cargo owner --help
...
$ cargo owner -a foo

Every. Time.

The error message isn't really helpful there (what's "options"?). We should either fix the error message or just support cargo owner add foo. Both would be good too.

@heisen-li
Copy link
Contributor

The current prompt message is like this:
image
Do you think it is necessary to provide more detailed help information?Or a better suggestion for modification. @alexcrichton

@ehuss
Copy link
Contributor

ehuss commented Dec 31, 2021

I think there are multiple things that can be done here.

cargo owner or cargo owner add currently does nothing. That's a bug in my eyes. I think if you do not pass any of the flags (--add, --remove, or --list), it should be an error.

We could add subcommands instead of using required args. I would probably organize it something like:

cargo owner add OWNER_NAME [CRATE_NAME]
cargo owner remove OWNER_NAME [CRATE_NAME]
cargo owner list [CRATE_NAME]

I'm torn on the idea of inferring the crate name from the current directory, but I guess that should be fine. (Making the user type it explicitly might be a little safer, but is probably not absolutely necessary.)

The old flags should be retained for backwards compatibility.

@epage epage added the S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing. label Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-owner S-needs-mentor Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants