Using the -filter *.ps1 parameter actually pulls in *.ps1* files in Windows PowerShell (note that this is NOT the case with PowerShell Core). A discussion around the idiosyncrasies of the parameter is here
Description
I removed the -Filter parameter and instead add the filter onto the path. This works in both Windows PowerShell and PowerShell Core.
This fixes the issue where you have *.ps1xml files in your source folder / subfolder. It ensure that only *.ps1 script files are included in the module.
How Has This Been Tested?
I ran a normal build script which had a *.ps1xml file in the source folder and it was not included in the script module.
Types of changes
[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Using the
-filter *.ps1
parameter actually pulls in*.ps1*
files in Windows PowerShell (note that this is NOT the case with PowerShell Core). A discussion around the idiosyncrasies of the parameter is hereDescription
I removed the
-Filter
parameter and instead add the filter onto the path. This works in both Windows PowerShell and PowerShell Core.Related Issue
https://github.com/psake/PowerShellBuild/issues/13
Motivation and Context
This fixes the issue where you have
*.ps1xml
files in your source folder / subfolder. It ensure that only*.ps1
script files are included in the module.How Has This Been Tested?
I ran a normal build script which had a *.ps1xml file in the source folder and it was not included in the script module.
Types of changes
Checklist: