Skip to content

Cargo info does not support underscore (_) for packages named with hyphen (-) #16442

@iampi31415

Description

@iampi31415

Problem

I expected the commands to be equivalent:

cargo info esp_println # with _ 
cargo info esp-println # with -

The latter is the actual name and runs fine. The former (with underscore) instead, says:

error: could not find esp_println in registry https://github.com/rust-lang/crates.io-index

Steps

cargo info esp_println # with _ 
cargo info esp-println # with -

Possible Solution(s)

Both should return the same output.

But if this is intentional a help message here suggesting replacing _ with - would be helpful.

I would say the same about -F flag, they should both be consistent with add imho and check for both _ and -.


Thanks for this great software, it's one of my favourites ever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-infoE-easyExperience: EasyS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions