pcgeek86 / PSGitHub

This PowerShell module contains commands to manage GitHub through its REST API.
MIT License
182 stars 39 forks source link

Switch to -Include instead of -Filter to fix PWSH issue #60

Closed jevansaks closed 4 years ago

jevansaks commented 4 years ago

I was finding that Install-Module PSGitHub worked but that many of the functions weren't working. I tracked it down to the fact that the Get-ChildItem call here wasn't recursing into the Functions directory. I think that this may be a behavior change for the -Filter parameter in PSCore, but -Include works across both PS5 and PSCore 6 so I am proposing to change.

felixfbecker commented 4 years ago

Did you test this on both PS5 and PS6?

jevansaks commented 4 years ago

I tested that the Get-ChildItem $(PSScriptRoot)\Functions -Recurse -File -Include *.ps1 command returns the right list in PS5 and PS6. I also manually made the changes to my installed PSGitHub and the functions are all imported correctly in both.

This could be related to https://github.com/PowerShell/PowerShell/issues/9461, as with the not working PSCore 6 scenario the module gets installed to a OneDrive synced location.