Fix error from profile.d PowerShell scripts

This commit is contained in:
David Refoua 2022-12-21 01:56:28 +03:30 committed by GitHub
commit 3b6e1cbf5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
vendor/profile.ps1 vendored
View File

@ -123,11 +123,11 @@ if (-not (Test-Path -PathType container "$ENV:CMDER_ROOT\config\profile.d")) {
Push-Location $ENV:CMDER_ROOT\config\profile.d
foreach ($x in Get-ChildItem *.psm1) {
Write-Verbose Write-Host Sourcing $x
Write-Verbose "Sourcing $x"
Import-Module $x
}
foreach ($x in Get-ChildItem *.ps1) {
Write-Verbose Write-Host Sourcing $x
Write-Verbose "Sourcing $x"
. $x
}
Pop-Location
@ -137,11 +137,11 @@ Pop-Location
if ($ENV:CMDER_USER_CONFIG -ne "" -and (Test-Path "$ENV:CMDER_USER_CONFIG\profile.d")) {
Push-Location $ENV:CMDER_USER_CONFIG\profile.d
foreach ($x in Get-ChildItem *.psm1) {
Write-Verbose Write-Host Sourcing $x
Write-Verbose "Sourcing $x"
Import-Module $x
}
foreach ($x in Get-ChildItem *.ps1) {
Write-Verbose Write-Host Sourcing $x
Write-Verbose "Sourcing $x"
. $x
}
Pop-Location