Fix sourcing of multiple files

This commit is contained in:
Manuel Thalmann 2023-07-27 04:35:52 +02:00
parent 779eedfaab
commit 192c47049d

View file

@ -11,5 +11,5 @@ $context.AddPowerShellProfileStatement(
'# Profile Files', '# Profile Files',
'$profilePath = "$PSScriptRoot/profile.d/*.ps1";', '$profilePath = "$PSScriptRoot/profile.d/*.ps1";',
'if (Test-Path $profilePath) {', 'if (Test-Path $profilePath) {',
' . $profilePath;', ' Get-Item $profilePath | Foreach-Item { . $_; };',
'}') -join ([System.Environment]::NewLine)); '}') -join ([System.Environment]::NewLine));