mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-26 13:23:05 +07:00
Debug
This commit is contained in:
parent
7261940ea5
commit
a3d47e556c
@ -1,4 +1,26 @@
|
|||||||
Write-Host $args[0]
|
Write-Host $args[0]
|
||||||
|
|
||||||
Write-Host $env:PATH
|
$os = $args[0]
|
||||||
|
|
||||||
|
$linuxDotnetPaths = @("/usr/share/dotnet")
|
||||||
|
$macOSDotnetPaths = @("/Users/runner/.dotnet")
|
||||||
|
$windowsDotnetPaths = @("$env:LocalAppData\Microsoft\dotnet/*", "$env:ProgramFiles\dotnet/*")
|
||||||
|
|
||||||
|
$pathsToClear = @()
|
||||||
|
|
||||||
|
if ($os == "linux") {
|
||||||
|
$pathsToClear = $linuxDotnetPaths
|
||||||
|
} elseif ($os == "macOS") {
|
||||||
|
$pathsToClear = $macOSDotnetPaths
|
||||||
|
} elseif ($os == "windows") {
|
||||||
|
$pathsToClear = $windowsDotnetPaths
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($path in $pathsToClear) {
|
||||||
|
if (Test-Path $path) {
|
||||||
|
Write-Host "Clear $path"
|
||||||
|
Remove-Item $path -Recurse -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dotnet --info
|
dotnet --info
|
Loading…
Reference in New Issue
Block a user