Skip to content

Commit

Permalink
chocolatey-visualstudio.extension: obtain InstallChannelUri from dete…
Browse files Browse the repository at this point in the history
…cted VS instances

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
  • Loading branch information
jberezanski committed May 15, 2018
1 parent b444158 commit 3f6250c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function Get-VSBootstrapperUrlFromChannelManifest
else
{
Write-Debug "Package parameters do not contain 'channelUri' or it is empty"
# TODO: check $ProductReference.InstallChannelUri
if ($ProductReference -ne $null -and -not [string]::IsNullOrEmpty($ProductReference.ChannelUri))
{
$manifestUri = $ProductReference.ChannelUri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
$props = @{
ChannelId = $channelId
ChannelUri = $null
InstallChannelUri = $null
ProductId = $productId
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
}
$optionalProductProperties = @{
nickname = 'nickname'
installChannelUri = 'installChannelUri'
}
$propertyNameSelector = (($expectedProductProperties.Values + $optionalProductProperties.Values) | ForEach-Object { "($_)" }) -join '|'
$regexTextBasicInfo = '"(?<name>{0})"\s*:\s*"(?<value>[^\"]+)"' -f $propertyNameSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ function New-VSProductReference
(
[Parameter(Mandatory = $true)] [string] $ChannelId,
[Parameter(Mandatory = $true)] [string] $ProductId,
[string] $ChannelUri
[string] $ChannelUri,
[string] $InstallChannelUri
)

$props = @{
ChannelId = $ChannelId
ChannelUri = $ChannelUri
InstallChannelUri = $InstallChannelUri
ProductId = $ProductId
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@

$argumentSet = $baseArgumentSet.Clone()
$argumentSet['installPath'] = $productInfo.installationPath
$argumentSet['__internal_productReference'] = New-VSProductReference -ChannelId $productInfo.channelId -ProductId $productInfo.productid -ChannelUri $productInfo.channelUri
$argumentSet['__internal_productReference'] = New-VSProductReference -ChannelId $productInfo.channelId -ProductId $productInfo.productid -ChannelUri $productInfo.channelUri -InstallChannelUri $productInfo.installChannelUri
$argumentSets += $argumentSet
}
}
Expand Down

0 comments on commit 3f6250c

Please sign in to comment.