winget-cli
winget-cli copied to clipboard
Repair-WingetPackageManager deployment operations not marked as complete
Brief description of your issue
When Repair-WinGetPackageManager is called from within a script, the deployment operation of VCLibs is never marked as completed, causing the progress bars to remain on the screen when called within a script
Steps to reproduce
Within a .ps1 script, call Repair-WinGetPackageManager and ensure there are commands which will prevent the script from exiting after the repair has completed.
Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager
while ($true) {}
Expected behavior
VCLibs is marked completed after it is installed, and the progress bars disappear after Repair-WinGetPackageManager has completed
Actual behavior
Environment
Clean Windows Sandbox
[Policy] Powershell [Policy] Area-Output