Skip to content

Commit 6760b33

Browse files
Copilotntrappe-msft
andcommitted
Fix container removal abort and silence registry key not found messages
Co-authored-by: ntrappe-msft <124631722+ntrappe-msft@users.noreply.github.com>
1 parent be715cf commit 6760b33

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ Remove-DockerContainers()
237237
$response = Read-Host $message
238238
if ($response -ne "y" -and $response -ne "Y")
239239
{
240-
Write-Output "Skipping Docker containers removal."
241-
return
240+
Write-Output "User chose not to remove containers. Aborting uninstall process."
241+
exit 0
242242
}
243243
}
244244

@@ -467,10 +467,7 @@ Remove-DockerRegistryKeys()
467467
Remove-Item $regPath -Recurse -Force
468468
Write-Output "Registry key removed: $regPath"
469469
}
470-
else
471-
{
472-
Write-Output "Registry key not found: $regPath"
473-
}
470+
# Registry key not found - silently continue
474471
}
475472
catch
476473
{

0 commit comments

Comments
 (0)