#10851 reported that feeding Get-Command output to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection, for instance - doesn't work as expected.
#10929 tried to fix that, but fell short.
Steps to reproduce
function foo {}; set-alias foo foo
(gcm -all foo | gcm).Count | Should -Be 2
(gcm -all foo | gcm).ComandType | Should -Be Alias, Function
Expected behavior
The tests should succeed.
Actual behavior
The tests fail:
Expected 2, but got 278 # *all* commands are returned
Expected @('Alias', 'Function'), but got $null
Environment data
PowerShell Core 7.0.0-preview.5, with PR #10929 applied
#10851 reported that feeding
Get-Commandoutput to itself via the pipeline - useful if you want to force loading of all modules in the context of reflection, for instance - doesn't work as expected.#10929 tried to fix that, but fell short.
Steps to reproduce
Expected behavior
The tests should succeed.
Actual behavior
The tests fail:
Environment data