Skip to content

Commit 257dddf

Browse files
authored
Update uninstall-dotnet-windows.ps1
1 parent f17f703 commit 257dddf

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/scripts/uninstall-dotnet-windows.ps1

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,24 @@ while (-not (Test-Path $uninstallToolPath) -and ($retry -lt $maxRetries)) {
3232
}
3333
if ($retry -eq $maxRetries) {
3434
Write-Error "Uninstall tool was not found after $maxRetries seconds."
35-
Get-Content -Path "log.txt" | Write-Host
35+
if (Test-Path "log.txt") { Get-Content -Path "log.txt" | Write-Host }
36+
37+
Write-Host "Expected: $uninstallToolPath"
38+
Write-Host "extractPath: $extractPath"
39+
Write-Host "extractPath exists? $(Test-Path $extractPath)"
40+
41+
Write-Host "Top-level contents of extractPath:"
42+
if (Test-Path $extractPath) {
43+
Get-ChildItem -Path $extractPath -Force -ErrorAction SilentlyContinue |
44+
Select-Object FullName | Out-String | Write-Host
45+
}
46+
47+
Write-Host "Searching for dotnet-core-uninstall.exe under extractPath (diagnostic only):"
48+
if (Test-Path $extractPath) {
49+
Get-ChildItem -Path $extractPath -Recurse -Filter "dotnet-core-uninstall.exe" -Force -ErrorAction SilentlyContinue |
50+
Select-Object FullName | Out-String | Write-Host
51+
}
52+
3653
exit 1
3754
}
3855

0 commit comments

Comments
 (0)