From 55dd527419bb2887a69b707b6f1b8d29956f2692 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Tue, 9 Feb 2021 16:17:32 -0600 Subject: [PATCH] Better module loader. --- Microsoft.PowerShell_profile.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index 8b3442f..8582fbc 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -24,15 +24,14 @@ if($IsWindows -eq "") { # Import some home grown PowerShell modules, if they are installed. $modPaths = Get-Childitem -Path "c:\src\dotfiles\psmodules" +$modPaths += Get-Childitem -Path "c:\src\minion\psmodule" if($modPaths.length -eq 0){ Write-Host "No modules found." } $modPaths | ForEach-Object { -# $_ | Format-Table - if(Test-Path -Path $_) { - Import-Module $_ - Write-Host ">> Loaded $_" - } + $fileName = $_.FullName + Import-Module $fileName + Write-Host ">> Loaded $fileName" } #} # $env:PSModulePath = $env:PSModulePath + ";c:\src\dotfiles\psmodules" -- 2.47.3