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

Added default fall-back when CARGO_HOME is not set for clean-cargo-cache #19843

Merged
merged 1 commit into from Jan 23, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added default fall-back when CARGO_HOME is not set for clean-cargo-cache

  • Loading branch information
terracotaPie authored and Timur Borkhodoev committed Jan 23, 2018
commit a8ac8c8929a6218874069bf5f0d7aa7c94dc2511
@@ -189,7 +189,8 @@ def get_size(path):
if os.environ.get("CARGO_HOME", ""):
cargo_dir = os.environ.get("CARGO_HOME")
else:
cargo_dir = path.join(self.context.topdir, ".cargo")
home_dir = os.path.expanduser("~")
cargo_dir = path.join(home_dir, ".cargo")
if not os.path.isdir(cargo_dir):
return
cargo_file = open(path.join(self.context.topdir, "Cargo.lock"))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.