Title: Get-Item -LiteralPath with FileSystem should fail on paths with wildcards · Issue #5057 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-Item -LiteralPath with FileSystem should fail on paths with wildcards · Issue #5057 · PowerShell/PowerShell
X Title: Get-Item -LiteralPath with FileSystem should fail on paths with wildcards · Issue #5057 · PowerShell/PowerShell
Description: If a path specified by -LiteralPath does not exist (or is not valid, i.e. contains forbidden characters) then Get-Item should emit an error. Currently this does not happen if a path is defined as a wildcard. The change #4866 fixed this i...
Open Graph Description: If a path specified by -LiteralPath does not exist (or is not valid, i.e. contains forbidden characters) then Get-Item should emit an error. Currently this does not happen if a path is defined as a...
X Description: If a path specified by -LiteralPath does not exist (or is not valid, i.e. contains forbidden characters) then Get-Item should emit an error. Currently this does not happen if a path is defined as a...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5057
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Item -LiteralPath with FileSystem should fail on paths with wildcards","articleBody":"If a path specified by `-LiteralPath` does not exist (or is not valid, i.e.\r\ncontains forbidden characters) then `Get-Item` should emit an error.\r\nCurrently this does not happen if a path is defined as a wildcard.\r\n\r\nThe change #4866 fixed this issue for `Remove-Item`.\r\nThe same or similar should be done for `Get-Item`.\r\n\r\n**Example:**\r\n\r\n\u003cstrike\u003eGiven items `z.*` and `[z]` do not exist\u003c/strike\u003e\r\nEDIT: Given item `[z]` does not exist. As for `z.*`, it is always \"invalid\" for `LiteralPath`.\r\n\r\n```powershell\r\nGet-Item -LiteralPath z.*\r\nGet-Item -LiteralPath [z]\r\n```\r\n\r\n**Expected result:**\r\n\r\n`Get-Item` emit errors about not found items.\r\n\r\nIn fact, an error for `z.*` may even be different, namely \"Illegal characters\r\nin the path\" because `*` or `?` are illegal for `-LiteralPath` and FileSystem.\r\n\r\n**Actual result:**\r\n\r\nThe above commands silently return nothing.\r\n","author":{"url":"https://github.com/nightroman","@type":"Person","name":"nightroman"},"datePublished":"2017-10-08T07:10:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5057/PowerShell/issues/5057"}
| 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:0e66a230-e495-0759-48ed-782d4c14c49d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAB4:A2078:83DB5C:B65F44:6A587A3F |
| html-safe-nonce | e1e9786f773326d4692c6a156cabdfb327498223bf7814733b23f4ea4ebe2789 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUI0OkEyMDc4OjgzREI1QzpCNjVGNDQ6NkE1ODdBM0YiLCJ2aXNpdG9yX2lkIjoiODY1NzA3Njc2NTI1NTU2MzgzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6b9a6f700f86b4ef8c23e19722307120d1e24bd65eddbefd77ee14f166e95796 |
| hovercard-subject-tag | issue:263698682 |
| 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/5057/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f09e412aa7b29557073517bce0875b27b6d0a2a187ee93dc0cadfa8362500d3f/PowerShell/PowerShell/issues/5057 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f09e412aa7b29557073517bce0875b27b6d0a2a187ee93dc0cadfa8362500d3f/PowerShell/PowerShell/issues/5057 |
| og:image:alt | If a path specified by -LiteralPath does not exist (or is not valid, i.e. contains forbidden characters) then Get-Item should emit an error. Currently this does not happen if a path is defined as a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nightroman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width