You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing PowerHTML module in a directory with a Types folder containing multiple .ps1xml files fails #8
I'm using PowerHTML is one of my modules, my module contains a Types folder with multiple .ps1xml files. When I am in my module's root directory and try to import the PowerHTML module, it fails with this error:
PS /Users/evan.yeung/git/OktaPS> Import-Module PowerHTML
Import-Module: The member 'FormatsToProcess' in the module manifest is not valid: The path cannot be processed because it resolved to more than one file; only one file at a time can be processed.. Verify that a valid value is specified for this field in the '/Users/evan.yeung/.local/share/powershell/Modules/PowerHTML/0.1.7/PowerHTML.psd1' file.
Activity
forevanyeung commentedon Oct 16, 2022
Submitted a PR that removes the wildcard matching in
FormatsToProcesswhich fixes the problem.Another alternative that will dynamically update format data for all files in the Types folder is adding the below code to the psm1 file.
However, during my testing, this does not clean up after removing the module. So I opted to go for statically defining the format files.