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

.crates2.json & .crates.toml file's directory #9940

Closed
esdnm opened this issue Sep 22, 2021 · 3 comments · Fixed by #9948
Closed

.crates2.json & .crates.toml file's directory #9940

esdnm opened this issue Sep 22, 2021 · 3 comments · Fixed by #9948
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug E-easy Experience: Easy

Comments

@esdnm
Copy link

esdnm commented Sep 22, 2021

I used cargo to install xsv.

cargo install xsv

After a few lookup i found that cargo stores some metadata in .crates2.json & .crates.toml. I looked for those files and found them in $HOME.

Is $HOME the right directory for them? I thought they will be stored in $CARGO_HOME.

Output of cargo version: 1.51.0

@esdnm esdnm added the C-bug Category: bug label Sep 22, 2021
@ehuss
Copy link
Contributor

ehuss commented Sep 22, 2021

The default should be $CARGO_HOME. There are several overrides, so maybe check that any of them are not set? They are described at https://doc.rust-lang.org/cargo/commands/cargo-install.html

@esdnm
Copy link
Author

esdnm commented Sep 22, 2021

I wanted cargo to store binaries in ~/bin and to do that i set install.root to my home directory.

As .crates2.json & .crates.toml are stored in home directory this tells cargo store them in install.root.

But I don't see any statements on this files and where they will be stored in https://doc.rust-lang.org/cargo/commands/cargo-install.html

@ehuss
Copy link
Contributor

ehuss commented Sep 22, 2021

Yea, that could definitely be made clearer. There is a brief mention in --no-track, but that is pretty obscure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug E-easy Experience: Easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants