Skip to content

Commit

Permalink
chocolatey-visualstudio.extension: use InstallChannelUri for VS Insta…
Browse files Browse the repository at this point in the history
…ller update only if --noWeb was requested

Without --noWeb, the VS Installer will use ChannelUri, so the extension
needs to to that, too.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
  • Loading branch information
jberezanski committed May 15, 2018
1 parent 4d74f2f commit b709fc5
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,17 @@

if ($shouldFixInstaller -or ($Operation -ne 'uninstall' -and -not $installerUpdated))
{
# TODO: $useInstallChannelUri only if --noWeb
$useInstallChannelUri = $Operation -ne 'update'
if ($Operation -ne 'update' -and $argumentSet.ContainsKey('noWeb'))
{
Write-Debug 'InstallChannelUri will be used for VS Installer update because operation is not "update" and --noWeb was passed in package parameters'
$useInstallChannelUri = $true
}
else
{
Write-Debug 'InstallChannelUri will not be used for VS Installer update because either operation is "update" or --noWeb was not passed in package parameters'
$useInstallChannelUri = $false
}

if ($PSCmdlet.ShouldProcess("Visual Studio Installer", "update"))
{
Assert-VSInstallerUpdated -PackageName $PackageName -PackageParameters $PackageParameters -ProductReference $thisProductReference -Url $BootstrapperUrl -Checksum $BootstrapperChecksum -ChecksumType $BootstrapperChecksumType -UseInstallChannelUri:$useInstallChannelUri
Expand Down

0 comments on commit b709fc5

Please sign in to comment.