Cleanup Cargo registry data folders (#914)

* Remove Cargo cache for Linux

* Remove Cargo cache for Windows

* Remove entire registry folder
This commit is contained in:
Maksim Petrov
2020-05-25 12:25:41 +03:00
committed by GitHub
parent 54effab40d
commit 85cc4ed839
2 changed files with 6 additions and 0 deletions

View File

@@ -32,6 +32,9 @@ for cmd in rustup rustc rustdoc cargo rustfmt cargo-clippy bindgen cbindgen; do
fi
done
# Cleanup Cargo cache
rm -rf "${CARGO_HOME}/registry/*"
# Update /etc/environemnt
prependEtcEnvironmentPath "${CARGO_HOME}/bin"

View File

@@ -44,5 +44,8 @@ if exist $env:RUSTUP_HOME (
$cmdPath = "C:\Rust\rustsym.bat"
$cmdRustSymScript | Out-File -Encoding ascii -FilePath $cmdPath
# Cleanup Cargo crates cache
Remove-Item "${env:CARGO_HOME}\registry\*" -Recurse -Force
# Update Run key to run a script at logon
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "RUSTSYM" -Value $cmdPath