From: Edward Delaporte Date: Mon, 8 Feb 2021 21:19:38 +0000 (-0600) Subject: Warning if not modules are loaded. X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/134d64499ba8bcced16691024d3a03526beaa358?ds=inline Warning if not modules are loaded. --- diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index 7a83696..8b3442f 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -24,6 +24,9 @@ if($IsWindows -eq "") { # Import some home grown PowerShell modules, if they are installed. $modPaths = Get-Childitem -Path "c:\src\dotfiles\psmodules" +if($modPaths.length -eq 0){ + Write-Host "No modules found." +} $modPaths | ForEach-Object { # $_ | Format-Table if(Test-Path -Path $_) {