21 lines
567 B
PowerShell
21 lines
567 B
PowerShell
|
function Get-ChocolateyInstallPath {
|
||
|
<#
|
||
|
.SYNOPSIS
|
||
|
Get the path to the root of the chocolatey install folder
|
||
|
#>
|
||
|
[CmdletBinding()]
|
||
|
Param()
|
||
|
|
||
|
$logLead = (Get-LogLeadName)
|
||
|
|
||
|
$envChocolateyInstallValue = $env:ChocolateyInstall
|
||
|
|
||
|
if ($null -eq $envChocolateyInstallValue) {
|
||
|
$envChocolateyInstallValue = (Join-Path -Path (Join-Path -Path $env:SystemDrive -ChildPath "ProgramData") -ChildPath "chocolatey")
|
||
|
}
|
||
|
|
||
|
Write-Verbose "$logLead : Found chocolatey install path [$envChocolateyInstallValue]"
|
||
|
return $envChocolateyInstallValue
|
||
|
}
|
||
|
|