mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-15 14:17:50 +08:00
Merge pull request #1865 from m01ar/master
Dot-Sourcing Error: PowerShell 5.1 and Windows Software Restriction Policy compatibility
This commit is contained in:
8
vendor/profile.ps1
vendored
8
vendor/profile.ps1
vendored
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user