Skip to content

Commit 7c69b67

Browse files
authored
Update uninstall-dotnet-windows.ps1
1 parent beeb0ca commit 7c69b67

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Download uninstall tool
2-
$releases = Invoke-RestMethod -Uri "https://api.github.com/repos/dotnet/cli-lab/releases/latest"
2+
$headers = @{
3+
Authorization = "Bearer $($env:GITHUB_TOKEN)"
4+
}
5+
$releases = Invoke-RestMethod -Uri "https://api.github.com/repos/dotnet/cli-lab/releases/latest" -Headers $headers
36
$asset = $releases.assets | Where-Object { $_.name -eq "dotnet-core-uninstall.msi" } | Select-Object -First 1
47
$url = $asset.browser_download_url
58
Invoke-WebRequest -Uri $url -OutFile $(Split-Path $url -Leaf)
@@ -22,7 +25,5 @@ if ($retry -eq $maxRetries) {
2225
}
2326

2427
# Perform uninstall
25-
& $uninstallToolPath remove --yes --force --all --aspnet-runtime --verbosity detailed
26-
& $uninstallToolPath remove --yes --force --all --hosting-bundle --verbosity detailed
2728
& $uninstallToolPath remove --yes --force --all --runtime --verbosity detailed
2829
& $uninstallToolPath remove --yes --force --all --sdk --verbosity detailed

0 commit comments

Comments
 (0)