Skip to content

Commit

Permalink
chocolatey-visualstudio.extension: update workaround for the boostrap…
Browse files Browse the repository at this point in the history
…per ignoring --wait in some cases

Related to: GH-7 GH-97
  • Loading branch information
jberezanski committed Mar 13, 2021
1 parent 03bda34 commit da54eea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions chocolatey-visualstudio.extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- The update process is short-circuited if the installed product version is already DesiredProductVersion or higher.
- After the update, the installed product version is checked to determine if the update actually happened. This makes it possible to detect a bug in the Visual Studio installer, which sometimes fails to download the channel manifest and thinks no update is needed.
- Fixed installed products detection being invoked twice by mistake.
- Updated workaround for the bootstrapper ignoring --wait when updating the VS Installer to account for a new process used by the VS Installer in 16.9+ (GH-7, GH-97).

## Version 1.9.0
- Added custom handling for '--installCatalogUri' to better support installations from layout without '--noWeb' ([GH-65](https://github.com/jberezanski/ChocolateyPackages/pull/65)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ function Wait-VSInstallerProcesses
# This sometimes happens when the VS installer is updated by the invoked bootstrapper.
# The initial process exits, leaving another instance of the VS installer performing the actual install in the background.
# This happens despite passing '--wait'.
$vsInstallerProcessNames = @('vs_bootstrapper', 'vs_setup_bootstrapper', 'vs_installer', 'vs_installershell', 'vs_installerservice')
$vsInstallerProcessNames = @('vs_bootstrapper', 'vs_setup_bootstrapper', 'vs_installer', 'vs_installershell', 'vs_installerservice', 'setup')
$vsInstallerProcessFilter = { $_.Name -ne 'setup' -or $_.Path -like '*\Microsoft Visual Studio\Installer\setup.exe' }
do
{
$vsInstallerProcesses = Get-Process -Name $vsInstallerProcessNames -ErrorAction SilentlyContinue | Where-Object { $null -ne $_ -and -not $_.HasExited }
$vsInstallerProcesses = Get-Process -Name $vsInstallerProcessNames -ErrorAction SilentlyContinue | Where-Object { $null -ne $_ -and -not $_.HasExited } | Where-Object $vsInstallerProcessFilter
$vsInstallerProcessCount = ($vsInstallerProcesses | Measure-Object).Count
if ($vsInstallerProcessCount -gt 0)
{
Expand Down

0 comments on commit da54eea

Please sign in to comment.