Fixed /home/szmedia/.local/share/powershell/Scripts assignment
This commit is contained in:
parent
bb23d940ea
commit
ef920fbb7d
|
@ -397,24 +397,19 @@ Write-Verbose $(Get-Item $MyPSModulePath | Select-Object -ExpandProperty FullNam
|
|||
|
||||
# Establish local/personal Script Root and make sure it's in $env:Path
|
||||
$local:p = Split-PathEnv $env:PATH
|
||||
$MyPSScriptRoot = Join-Path (Split-Path -Parent $MyPSModulePath) Scripts
|
||||
Write-Verbose "MyPSScriptRoot = $MyPSScriptRoot"
|
||||
if ( -not (Test-Path $MyPSScriptRoot) ) {
|
||||
New-Item -ItemType Directory -Path $MyPSScriptRoot -Force | Out-Null
|
||||
New-Item -ItemType Directory -Path $MyPSScriptRoot/profile.d -Force | Out-Null
|
||||
$local:My_PSScriptRoot = Join-Path (Split-Path -Parent $MyPSModulePath) Scripts
|
||||
Write-Verbose "MyPSScriptRoot = $My_PSScriptRoot"
|
||||
if ( -not (Test-Path $My_PSScriptRoot) ) {
|
||||
New-Item -ItemType Directory -Path $My_PSScriptRoot -Force | Out-Null
|
||||
New-Item -ItemType Directory -Path $My_PSScriptRoot/profile.d -Force | Out-Null
|
||||
}
|
||||
$global:MyPSScriptRoot = $MyPSScriptRoot
|
||||
$global:MyPSScriptRoot = $My_PSScriptRoot
|
||||
|
||||
$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..."
|
||||
$importExpression = "ProfileCode_common"
|
||||
}
|
||||
. Invoke-Expression $importExpression
|
||||
. ProfileCode_common
|
||||
|
||||
$SetupFromWeb = [bool]$(@( $SetupFromWeb, $sfw, $LoadCode ) | Where-Object { $_ })
|
||||
|
||||
|
|
Loading…
Reference in New Issue