Title: Get-ChildItem ignores the -Depth parameter when -Include or -Exclude are specified · Issue #3726 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-ChildItem ignores the -Depth parameter when -Include or -Exclude are specified · Issue #3726 · PowerShell/PowerShell
X Title: Get-ChildItem ignores the -Depth parameter when -Include or -Exclude are specified · Issue #3726 · PowerShell/PowerShell
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-Object Expected behavior All 3 commands should ...
Open Graph 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-Object ...
X 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-Object ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3726
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-ChildItem ignores the -Depth parameter when -Include or -Exclude are specified","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```powershell\r\nSet-Location ~\r\nGet-ChildItem . -Depth 0 | Measure-Object\r\nGet-ChildItem . -Depth 0 -Include * | Measure-Object\r\nGet-ChildItem . -Depth 0 -Exclude NoSuchItemImSure | Measure-Object\r\n```\r\n\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nAll 3 commands should output the same number - the count of items in the current dir.\r\n\r\nActual behavior\r\n---------------\r\n\r\n* The 1st command reports the number of items in the current directory only.\r\n\r\n* The 2nd and 3rd commands unexpectedly traverse the entire subtree, ignoring `-Depth 0`. \r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on macOS 10.12.4\r\nPowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on Microsoft Windows 10 Pro (64-bit; v10.0.14393)\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-05-07T20:25:36Z","url":"https://github.com/PowerShell/PowerShell/issues/3726"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:64361cb5-d5bf-d3d3-0246-9606a2020da4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2C6:274D5F:A3B404:EC3ABD:6AFD91F9 |
| html-safe-nonce | eddaffec5d97fb5f74dfd9a991443f5dbb7f588cabf1654c3ee7aee70d639ecc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkM2OjI3NEQ1RjpBM0I0MDQ6RUMzQUJEOjZBRkQ5MUY5IiwidmlzaXRvcl9pZCI6IjkwODIzODUwMDQxMDQ2MTg0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8be2e5528072b9c1748b6313027709eec91fee93fddb2fdbedb4927c90d75c50 |
| hovercard-subject-tag | issue:226891110 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3726/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a557ee0178ec58bd44f4f12430174cd5385f2e0c032f73c6b9b5f357144641b/PowerShell/PowerShell/issues/3726 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a557ee0178ec58bd44f4f12430174cd5385f2e0c032f73c6b9b5f357144641b/PowerShell/PowerShell/issues/3726 |
| og:image:alt | 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-Object ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width