fixed scoping issue
This commit is contained in:
parent
0718bf28c7
commit
a782d09b2c
|
@ -409,10 +409,12 @@ $p = @($p[0], $MyPSScriptRoot) + $($p | Select-Object -Skip 1)
|
|||
$env:PATH = $p -join $PathEnvDelimiter
|
||||
}
|
||||
|
||||
$local:importExpression = ""
|
||||
if ( -not $MyPSScriptRoot -or (Test-Path function:Test-IsAdmin, function:ConvertTo-Base64, function:Invoke-ExpressionEx, function:Get-PowerShellPath, function:Export-FunctionSource | Where-Object { -not $_ } | Measure-Object | Select-Object -ExpandProperty Count) ) {
|
||||
Write-Verbose "Calling ProfileCode inline..."
|
||||
. ProfileCode_common
|
||||
$importExpression = "ProfileCode_common"
|
||||
}
|
||||
. Invoke-Expression $importExpression
|
||||
|
||||
$SetupFromWeb = [bool]$(@( $SetupFromWeb, $sfw, $LoadCode ) | Where-Object { $_ })
|
||||
|
||||
|
|
Loading…
Reference in New Issue