mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 06:40:32 +00:00
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:
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user