From: Edward Delaporte Date: Tue, 9 Feb 2021 22:17:32 +0000 (-0600) Subject: Better module loader. X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/55dd527419bb2887a69b707b6f1b8d29956f2692 Better module loader. --- 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"