mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Cleanup Cargo cache
|
||||||
|
rm -rf "${CARGO_HOME}/registry/*"
|
||||||
|
|
||||||
# Update /etc/environemnt
|
# Update /etc/environemnt
|
||||||
prependEtcEnvironmentPath "${CARGO_HOME}/bin"
|
prependEtcEnvironmentPath "${CARGO_HOME}/bin"
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,8 @@ if exist $env:RUSTUP_HOME (
|
|||||||
$cmdPath = "C:\Rust\rustsym.bat"
|
$cmdPath = "C:\Rust\rustsym.bat"
|
||||||
$cmdRustSymScript | Out-File -Encoding ascii -FilePath $cmdPath
|
$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
|
# Update Run key to run a script at logon
|
||||||
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "RUSTSYM" -Value $cmdPath
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "RUSTSYM" -Value $cmdPath
|
||||||
|
|||||||
Reference in New Issue
Block a user