Skip to content

Commit 89cd35d

Browse files
committed
Try fix windows ci
1 parent 7bef883 commit 89cd35d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ $url = $asset.browser_download_url
55
Invoke-WebRequest -Uri $url -OutFile $(Split-Path $url -Leaf)
66

77
# Prepare uninstall tool
8-
msiexec.exe /A dotnet-core-uninstall.msi TARGETDIR=$pwd /QN /L*V log.txt
9-
$uninstallToolPath = Join-Path $pwd "dotnet-core-uninstall\dotnet-core-uninstall.exe"
8+
$extractPath = Join-Path $pwd "dotnet-core-uninstall" # needs to be a new path
9+
msiexec.exe /A dotnet-core-uninstall.msi TARGETDIR=$extractPath /QN /L*V log.txt
10+
$uninstallToolPath = Join-Path $extractPath "dotnet-core-uninstall" "dotnet-core-uninstall.exe"
11+
# wait for the tool to be ready
12+
while (-not (Test-Path $uninstallToolPath)) {
13+
Start-Sleep -Seconds 1
14+
}
1015

1116
# Perform uninstall
1217
& $uninstallToolPath remove --all

0 commit comments

Comments
 (0)