Merge pull request #1865 from m01ar/master

Dot-Sourcing Error: PowerShell 5.1 and Windows Software Restriction Policy compatibility
This commit is contained in:
Benjamin Staneck
2018-08-30 15:24:38 +02:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

8
vendor/profile.ps1 vendored
View File

@ -134,7 +134,7 @@ if (-not (test-path "$ENV:CMDER_ROOT\config\profile.d")) {
pushd $ENV:CMDER_ROOT\config\profile.d
foreach ($x in Get-ChildItem *.ps1) {
# write-host write-host Sourcing $x
. $x
Import-Module $x
}
popd
@ -144,7 +144,7 @@ if ($ENV:CMDER_USER_CONFIG -ne "" -and (test-path "$ENV:CMDER_USER_CONFIG\profil
pushd $ENV:CMDER_USER_CONFIG\profile.d
foreach ($x in Get-ChildItem *.ps1) {
# write-host write-host Sourcing $x
. $x
Import-Module $x
}
popd
}
@ -154,13 +154,13 @@ if ($ENV:CMDER_USER_CONFIG -ne "" -and (test-path "$ENV:CMDER_USER_CONFIG\profil
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config\user-profile.ps1"
if (Test-Path $CmderUserProfilePath) {
# Create this file and place your own command in there.
. "$CmderUserProfilePath"
Import-Module "$CmderUserProfilePath"
}
if ($ENV:CMDER_USER_CONFIG) {
$CmderUserProfilePath = Join-Path $ENV:CMDER_USER_CONFIG "user-profile.ps1"
if (Test-Path $CmderUserProfilePath) {
. "$CmderUserProfilePath"
Import-Module "$CmderUserProfilePath"
}
}