| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /ProgramData/chocolatey/extensions/chocolatey-visualstudio/ |
Upload File : |
function Resolve-VSLayoutPath
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory = $true)] [hashtable] $PackageParameters
)
Write-Debug 'Detecting if a layout path was provided via package parameters'
if ($PackageParameters.ContainsKey('installLayoutPath'))
{
$installLayoutPath = $PackageParameters['installLayoutPath']
if (-not [string]::IsNullOrEmpty($installLayoutPath))
{
Write-Debug "Using installLayoutPath provided via package parameters: $installLayoutPath"
return $installLayoutPath
}
else
{
Write-Debug 'Package parameters contain installLayoutPath, but it is empty - ignoring'
}
}
if ($PackageParameters.ContainsKey('bootstrapperPath'))
{
$bootstrapperPath = $PackageParameters['bootstrapperPath']
if (-not [string]::IsNullOrEmpty($bootstrapperPath))
{
$installLayoutPath = Split-Path -Path $bootstrapperPath
Write-Debug "Using installLayoutPath computed from bootstrapperPath provided via package parameters: $installLayoutPath"
return $installLayoutPath
}
else
{
Write-Debug 'Package parameters contain $bootstrapperPath, but it is empty - ignoring'
}
}
Write-Debug 'A layout path was not provided via package parameters'
return $null
}