Skip to content

Commit

Permalink
chocolatey-visualstudio.extension: install the VS Installer from layo…
Browse files Browse the repository at this point in the history
…ut, if present

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
  • Loading branch information
jberezanski committed May 15, 2018
1 parent c84ad06 commit be34835
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,20 @@ function Install-VSInstaller
$PackageParameters.Remove($parameterToRemove)
}

# TODO: if bootstrapperPath present, check for existence of vs_installer.opc and auto add --offline
# TODO: same for installLayoutPath
# if installing from layout, check for existence of vs_installer.opc and auto add --offline
if (-not $packageParameters.ContainsKey('offline'))
{
$layoutPath = Resolve-VSLayoutPath -PackageParameters $PackageParameters
if ($layoutPath -ne $null)
{
$installerOpcPath = Join-Path -Path $layoutPath -ChildPath 'vs_installer.opc'
if (Test-Path -Path $installerOpcPath)
{
Write-Debug "Using the VS Installer package present in the layout path: $installerOpcPath"
$packageParameters['offline'] = $installerOpcPath
}
}
}

# --update must be last
$packageParameters['quiet'] = $null
Expand Down

0 comments on commit be34835

Please sign in to comment.