File tree Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,21 @@ curl -L -o "$filename" "$download_url"
10
10
tar -xzf " $filename "
11
11
uninstall_tool_path=$( find . -name dotnet-core-uninstall)
12
12
chmod +x " $tool_path "
13
+ # wait for the tool to be ready
14
+ max_retries=30
15
+ retry=0
16
+ while [[ ! -f " $uninstall_tool_path " && $retry -lt $max_retries ]]; do
17
+ sleep 1
18
+ (( retry++ ))
19
+ done
20
+ if [[ $retry -eq $max_retries ]]; then
21
+ echo " Uninstall tool was not found after $max_retries seconds." >&2
22
+ cat " log.txt"
23
+ exit 1
24
+ fi
13
25
14
26
# Perform uninstall
15
- " $uninstall_tool_path " remove --yes --force --all --aspnet-runtime
16
- " $uninstall_tool_path " remove --yes --force --all --hosting-bundle
17
- " $uninstall_tool_path " remove --yes --force --all --runtime
18
- " $uninstall_tool_path " remove --yes --force --all --sdk
27
+ " $uninstall_tool_path " remove --yes --force --all --aspnet-runtime --verbosity detailed
28
+ " $uninstall_tool_path " remove --yes --force --all --hosting-bundle --verbosity detailed
29
+ " $uninstall_tool_path " remove --yes --force --all --runtime --verbosity detailed
30
+ " $uninstall_tool_path " remove --yes --force --all --sdk --verbosity detailed
Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ while (-not (Test-Path $uninstallToolPath) -and ($retry -lt $maxRetries)) {
17
17
}
18
18
if ($retry -eq $maxRetries ) {
19
19
Write-Error " Uninstall tool was not found after $maxRetries seconds."
20
+ Get-Content - Path " log.txt" | Write-Host
20
21
exit 1
21
22
}
22
23
23
24
# Perform uninstall
24
- & $uninstallToolPath remove -- yes -- force -- all -- aspnet- runtime
25
- & $uninstallToolPath remove -- yes -- force -- all -- hosting- bundle
26
- & $uninstallToolPath remove -- yes -- force -- all -- runtime
27
- & $uninstallToolPath remove -- yes -- force -- all -- sdk
25
+ & $uninstallToolPath remove -- yes -- force -- all -- aspnet- runtime -- verbosity detailed
26
+ & $uninstallToolPath remove -- yes -- force -- all -- hosting- bundle -- verbosity detailed
27
+ & $uninstallToolPath remove -- yes -- force -- all -- runtime -- verbosity detailed
28
+ & $uninstallToolPath remove -- yes -- force -- all -- sdk -- verbosity detailed
You can’t perform that action at this time.
0 commit comments