Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Incorrect output directory reported with mismatched '-' and '_' chars #8

Open
TyPR124 opened this issue Apr 11, 2021 · 0 comments
Open

Comments

@TyPR124
Copy link

TyPR124 commented Apr 11, 2021

In crate names, the - and _ characters are treated as equal. For example, cargo_download is an alias of cargo-download.

cargo download reports the extracted directory as the name passed in, but actually extracts to the proper directory name.

See:

PS D:\dev> cargo download -x cargo_download
INFO: cargo-download v0.1.2
INFO: Latest version of crate cargo_download=* is 0.1.2
INFO: Crate `cargo_download==0.1.2` downloaded successfully
INFO: Crate content extracted to ./cargo_download-0.1.2/
PS D:\dev> cd cargo_download-0.1.2
Set-Location: Cannot find path 'D:\dev\cargo_download-0.1.2' because it does not exist.

The issue can also happen in reverse with crates that have _ in their proper name.

I feel the extracted directory should stay as the proper name, and the reported directory should be fixed to reflect that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant