| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Perfect, thanks so much! Weird, seems like there may be a bug in Get-Command itself because that behavior is changing between the module-qualified command name, and passing the module name as a separate parameter. Maybe a sorting issue, we don't know. This is a good workaround given your tests.
Sorry, something went wrong.
|
Liam Peters (@liamjpeters) can you rebase this so the PR checks trigger and I can merge it? Thanks! |
Sorry, something went wrong.
…rm module\cmdletName
|
My Git-Fu is not strong Andy Jordan (@andyleejordan) 😅 Did I do it? |
Sorry, something went wrong.
|
You did it! CI Tests are running now 😄 |
Sorry, something went wrong.
|
If only it had succeeded. Drat. The offending test that failed on the mac build runner: PSScriptAnalyzer/Tests/Rules/UseCorrectCasing.tests.ps1 Lines 77 to 85 in ea70855 I don't have a mac to try it on, but the failure looks like the runspace safety issue with the command info cache - an old discussion and summary in issue #1867. I've run the test in a loop and managed to get it to fail once with the same error on my Windows machine after about 20 mins of running. I've managed the same on the master branch just now:
I'm not sure how to check whether this PR makes this issue more prevalent or if it's the same as it has been and just got unlucky with the CI run. |
Sorry, something went wrong.
|
That seems like it's a flaky test, I'm rerunning the CI. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
When the CommandInfoCache is used to lookup some fully qualified commands (by way of Get-Command), a nested module name is returned.
PR changes CommandInfoCache when a CommandInfo is looked up for a command in the form module\cmdletName. It passes this module name hint along to Get-Command to allow correct resolution.
With the MicrosoftTeams module installed, as an example, running:
Reports the commands module as Microsoft.Teams.ConfigAPI.Cmdlets.
Instead running:
Correctly reports the module as MicrosoftTeams.
Also happens for Az.resources\Get-AzRoleEligibilitySchedule
Fixes #2123
Fixes #2023
PR Checklist