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

Incorrect document regarding default value of --target-dir of cargo install #9137

Closed
seamlik opened this issue Feb 5, 2021 · 0 comments · Fixed by #9189
Closed

Incorrect document regarding default value of --target-dir of cargo install #9137

seamlik opened this issue Feb 5, 2021 · 0 comments · Fixed by #9189
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug

Comments

@seamlik
Copy link

seamlik commented Feb 5, 2021

Problem

In the manual, it says the default value of --target-dir is target in the root of the workspace. However when I install a crate, the build cache is actually somewhere else. Only if I add --target-dir target to the command would Cargo put the build cache there.

Motivation

When running the verification on a CI, I expected that we can cache the build of a cargo install as well which saves a lot of time. However I was misguided by the document.

Steps

  1. cd into a workspace
  2. cargo clean
  3. cargo install cargo-audit
  4. Observe that no target directory is created

Possible Solution(s)

  • Let cargo install place the build cache at target
  • Document the actual default place of the build cache

Output of cargo version:

cargo 1.51.0-nightly (783bc43c6 2021-01-20)
Linux 5.8.0-41-generic #46-Ubuntu SMP Mon Jan 18 16:48:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants