Get-ChildItem -path '/' breaks -exclude or -include parameters #15497
Labels
Area-FileSystem-Provider
specific to the FileSystem provider
Issue-Bug
Issue has been identified as a bug in the product
Needs-Triage
The issue is new and needs to be triaged by a work group.
WG-Cmdlets-Management
cmdlets in the Microsoft.PowerShell.Management module
WG-Engine-Providers
built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
I believe there is a bug with
Get-ChildItem
for pwsh v7.1.3 on Ubuntu 20.04 (WSL2) when using the-exclude
and-include
parameters in conjunction with the-Path '/'
parameter/argument combo.This seems primarily be limited to
Get-ChildItem -Path '/'
as both-LiteralPath '/'
and-PSPath (Get-Item -Path '/').PSPath
return the data as expected when used with either-exclude
or-include
.Additionally using
-exclude
and-path
together works for directories outside/
. However, I believe there may be another bug when using-Path
and-Include
other places as well.Steps to reproduce
Get-ChildItem -Path '/' -Exclude 'mnt'
Get-ChildItem -Path '/' -Include 'mnt'
I'm unsure if the behavior of
-Include
deserves its own bug report but would be happy to split it up if needed.Environment data
The text was updated successfully, but these errors were encountered: