-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
HacktoberfestPotential candidate to participate in HacktoberfestPotential candidate to participate in HacktoberfestIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Description
Steps to reproduce
Set-Location ~
Get-ChildItem . -Depth 0 | Measure-Object
Get-ChildItem . -Depth 0 -Include * | Measure-Object
Get-ChildItem . -Depth 0 -Exclude NoSuchItemImSure | Measure-ObjectExpected behavior
All 3 commands should output the same number - the count of items in the current dir.
Actual behavior
-
The 1st command reports the number of items in the current directory only.
-
The 2nd and 3rd commands unexpectedly traverse the entire subtree, ignoring
-Depth 0.
Environment data
PowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on macOS 10.12.4
PowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on Microsoft Windows 10 Pro (64-bit; v10.0.14393)Windos, psmolkin and tfaulkner-eaglegroup
Metadata
Metadata
Assignees
Labels
HacktoberfestPotential candidate to participate in HacktoberfestPotential candidate to participate in HacktoberfestIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module