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

CARGO_HOME is not used when storing advisory-db in 0.8.1 #302

Closed
realcundo opened this issue Oct 21, 2020 · 4 comments · Fixed by #303
Closed

CARGO_HOME is not used when storing advisory-db in 0.8.1 #302

realcundo opened this issue Oct 21, 2020 · 4 comments · Fixed by #303
Labels
bug Something isn't working

Comments

@realcundo
Copy link

Describe the bug
Not really a bug report, just a clarification whether the difference in behaviour between 0.7.3 and 0.8.1 is intentional.

To Reproduce
Steps to reproduce the behavior:

  1. make sure there is no deny.toml, i.e. defaults are used
  2. run cargo deny check

Observed behavior
In 0.7.3:
Databse is downloaded to $CARGO_HOME/advisory-db

In 0.8.1:
Databse is downloaded to $HOME/.cargo/advisory-db, ignoring $CARGO_HOME.

Additional context

In my builds $HOME is not RW, only $CARGO_HOME is so using cargo-deny with defaults started failing.

The new behaviour is maybe in line with cargo deny init setting the db-path as ~/.cargo/advisory-db in both 0.7.3 and 0.8.1.

Is this change intentional?

@realcundo realcundo added the bug Something isn't working label Oct 21, 2020
@Jake-Shadle
Copy link
Member

Hmm, I'd have to look at the history, cargo-deny never explicitly supported $CARGO_HOME but it's possible the behavior or crate used to resolve the root cargo path has changed.

Thanks for the report!

@Jake-Shadle
Copy link
Member

Ahh ok, looking at the history the order of resolution changed, this was unintended so I'll patch it to return to the old behavior.

@realcundo
Copy link
Author

Thank you, I can confirm that 0.8.2 respects $CARGO_HOME value and doesn't try to write anything to $HOME.

@Jake-Shadle
Copy link
Member

Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants