publish-powershell-module-action icon indicating copy to clipboard operation
publish-powershell-module-action copied to clipboard

Failed to find Module Dir

Open tibmeister opened this issue 4 years ago • 3 comments

You are not clear on how you are expecting the file structure to be for this to work. I created a subdir with the same name of my module, in the root of my repository.

tibmeister avatar Apr 07 '21 00:04 tibmeister

#9 might make this obsolete

chris-peterson avatar Aug 15 '21 19:08 chris-peterson

Not working under v20 of your actions. v19 no longer works at all.

tibmeister avatar Feb 24 '22 16:02 tibmeister

you can either set INPUT_MODULEPATH to the path of your module folder, or structure your tree however you like provided you have a 1-1 of psd1 files to module root directories.

if ([string]::IsNullOrWhiteSpace($env:INPUT_MODULEPATH)) {
    $Modules = Get-ChildItem -Recurse -Filter '*.psd1' |
        Select-Object -Unique -ExpandProperty Directory
} else {
    $Modules = @($env:INPUT_MODULEPATH)
}

chris-peterson avatar Feb 24 '22 18:02 chris-peterson