Skip to content

Commit

Permalink
Fixed a bug where kansa.ps1 wouldn't properly handle a -ModulePath ar…
Browse files Browse the repository at this point in the history
…gument that pointed directly to a module.
  • Loading branch information
davehull committed May 24, 2014
1 parent 532aab6 commit 54f9cb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kansa.ps1
Expand Up @@ -197,6 +197,10 @@ Param(
Write-Debug "Entering $($MyInvocation.MyCommand)"
Write-Debug "`$ModulePath is ${ModulePath}."
$Modules = $FoundModules = @()
if (!(ls $ModulePath -ErrorAction SilentlyContinue).PSIsContainer) {
"`$ModulePath argument, ${ModulePath}, must be a directory." | Add-Content -Encoding $Encoding $ErrorLog
Exit-Script
}
Try {
$ModConf = $ModulePath + "\" + "Modules.conf"
if (Test-Path($Modconf)) {
Expand Down

0 comments on commit 54f9cb6

Please sign in to comment.