Skip to content

Commit

Permalink
fix sorting for custom profile files
Browse files Browse the repository at this point in the history
  • Loading branch information
jpawlowski committed Aug 18, 2024
1 parent c9d6700 commit 802650b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ try {
#
$__PSProfileDirectoryPath = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'd')
if ([System.IO.Directory]::Exists($__PSProfileDirectoryPath)) {
foreach ($file in [System.Array]::Sort( [System.IO.Directory]::GetFiles($__PSProfileDirectoryPath, '*.ps1') )) {
. $file
$__PSProfileCustomProfileFiles = [System.IO.Directory]::GetFiles($__PSProfileDirectoryPath, '*.ps1')
[System.Array]::Sort($__PSProfileCustomProfileFiles)
foreach ($__PSProfileCustomProfileFile in $__PSProfileCustomProfileFiles) {
. $__PSProfileCustomProfileFile
}
}
#endregion Custom Profile --------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ try {
# To load your own custom profile, you may create a directory named 'Microsoft.VSCode_profile.d' in the same directory as this file.
# Then, place your custom profile files in the 'Microsoft.VSCode_profile.d' directory to load them automatically.
#
$__PSProfileDirectoryPath = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, '.d')
$__PSProfileDirectoryPath = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'd')
if ([System.IO.Directory]::Exists($__PSProfileDirectoryPath)) {
foreach ($file in [System.Array]::Sort( [System.IO.Directory]::GetFiles($__PSProfileDirectoryPath, '*.ps1') )) {
. $file
$__PSProfileCustomProfileFiles = [System.IO.Directory]::GetFiles($__PSProfileDirectoryPath, '*.ps1')
[System.Array]::Sort($__PSProfileCustomProfileFiles)
foreach ($__PSProfileCustomProfileFile in $__PSProfileCustomProfileFiles) {
. $__PSProfileCustomProfileFile
}
}
#endregion Custom Profile --------------------------------------------------
Expand Down

0 comments on commit 802650b

Please sign in to comment.