@@ -68,28 +68,35 @@ Enjoy!
6868'@
6969
7070 if (-not [string ]::IsNullOrEmpty($SourceModule )) {
71- if (-not (test-path $SourceModule ) -or ($SourceModule -notmatch ' *.psd1' )) {
72- throw ' SourceModule was not found or is not a psd1 module manifest file!'
71+ if (-not [string ]::IsNullOrEmpty($SourceModule ))
72+ {
73+ if (-not (test-path $SourceModule ) -or ((Get-Item $SourceModule ).Extension -notmatch ' .psd1' )) {
74+ throw " $ ( $SourceModule ) was not found or is not a psd1 module manifest file!"
75+ } ElseIf ((test-path $SourceModule ) -and (Get-Item $SourceModule ).Extension -match ' .psd1' ) {
76+ Write-Verbose " $ ( $SourceModule ) Matched to .psd1 file"
77+ }
7378 }
74-
79+
7580 $ExistingModuleManifest = Test-ModuleManifest $SourceModule
7681
77- $ModuleProps = @ {
82+ $PlasterParams = @ {
7883 TemplatePath = Join-Path $MyModulePath ' plaster\ModuleBuild\' ;
7984 ModuleName = $ExistingModuleManifest.Name ;
8085 ModuleDescription = $ExistingModuleManifest.Description ;
8186 ModuleAuthor = $ExistingModuleManifest.Author ;
87+ ModuleCompanyName = $ExistingModuleManifest.CompanyName ;
8288 ModuleWebsite = $ExistingModuleManifest.ProjectURI.ToString ();
8389 ModuleVersion = $ExistingModuleManifest.Version.ToString ();
8490 ModuleTags = $ExistingModuleManifest.Tags -join ' ,' ;
8591 }
86- }
87- $PlasterParams = @ {
88- TemplatePath = Join-Path $MyModulePath ' plaster\ModuleBuild\'
92+ } else {
93+ $PlasterParams = @ {
94+ TemplatePath = Join-Path $MyModulePath ' plaster\ModuleBuild\'
95+ }
8996 }
9097 if (-not [string ]::IsNullOrEmpty($Path )) {
9198 $PlasterParams.DestinationPath = $Path
92- }
99+ }
93100
94101 if (get-module Plaster) {
95102 Write-Output ' Removing already loaded version of Plaster as we need to use our custom version instead..'
0 commit comments