mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Update profile.ps1
Fixes Powershell 5.1 error when Windows Software Restriction Policy is enabled: bin\vendor\profile.ps1 : Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator. At line:1 char:1 + . 'bin\vendor\conemu-maximus5\..\profi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [profile.ps1], NotSupportedException + FullyQualifiedErrorId : DotSourceNotSupported,profile.ps1
This commit is contained in:
parent
4655888690
commit
34bb62409a
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
|
pushd $ENV:CMDER_ROOT\config\profile.d
|
||||||
foreach ($x in Get-ChildItem *.ps1) {
|
foreach ($x in Get-ChildItem *.ps1) {
|
||||||
# write-host write-host Sourcing $x
|
# write-host write-host Sourcing $x
|
||||||
. $x
|
Import-Module $x
|
||||||
}
|
}
|
||||||
popd
|
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
|
pushd $ENV:CMDER_USER_CONFIG\profile.d
|
||||||
foreach ($x in Get-ChildItem *.ps1) {
|
foreach ($x in Get-ChildItem *.ps1) {
|
||||||
# write-host write-host Sourcing $x
|
# write-host write-host Sourcing $x
|
||||||
. $x
|
Import-Module $x
|
||||||
}
|
}
|
||||||
popd
|
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"
|
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config\user-profile.ps1"
|
||||||
if (Test-Path $CmderUserProfilePath) {
|
if (Test-Path $CmderUserProfilePath) {
|
||||||
# Create this file and place your own command in there.
|
# Create this file and place your own command in there.
|
||||||
. "$CmderUserProfilePath"
|
Import-Module "$CmderUserProfilePath"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ENV:CMDER_USER_CONFIG) {
|
if ($ENV:CMDER_USER_CONFIG) {
|
||||||
$CmderUserProfilePath = Join-Path $ENV:CMDER_USER_CONFIG "user-profile.ps1"
|
$CmderUserProfilePath = Join-Path $ENV:CMDER_USER_CONFIG "user-profile.ps1"
|
||||||
if (Test-Path $CmderUserProfilePath) {
|
if (Test-Path $CmderUserProfilePath) {
|
||||||
. "$CmderUserProfilePath"
|
Import-Module "$CmderUserProfilePath"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user