Title: Translating PSDrive-based path arguments for external (native) executables is overzealous (PSNativePSPathResolution) · Issue #13640 · PowerShell/PowerShell · GitHub
Open Graph Title: Translating PSDrive-based path arguments for external (native) executables is overzealous (PSNativePSPathResolution) · Issue #13640 · PowerShell/PowerShell
X Title: Translating PSDrive-based path arguments for external (native) executables is overzealous (PSNativePSPathResolution) · Issue #13640 · PowerShell/PowerShell
Description: PR #12386 introduced experimental feature PSNativePSPathResolution, which as of (at least) PowerShell Core 7.1.0-preview.7 has become a default feature. For problems with this feature in general, see #13644 Its purpose is to translate Po...
Open Graph Description: PR #12386 introduced experimental feature PSNativePSPathResolution, which as of (at least) PowerShell Core 7.1.0-preview.7 has become a default feature. For problems with this feature in general, s...
X Description: PR #12386 introduced experimental feature PSNativePSPathResolution, which as of (at least) PowerShell Core 7.1.0-preview.7 has become a default feature. For problems with this feature in general, s...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/13640
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Translating PSDrive-based path arguments for external (native) executables is overzealous (PSNativePSPathResolution)","articleBody":"PR #12386 introduced _experimental_ feature `PSNativePSPathResolution`, which as of (at least) PowerShell Core 7.1.0-preview.7 has become a _default_ feature.\r\n\r\n* For problems with this feature in general, see #13644\r\n\r\nIts purpose is to translate _PowerShell-drive-based_ paths to _native filesystem_ paths, because external executables only understand the latter.\r\n\r\nThis translation is currently overzealous in that it nonsensically translates an argument that _starts with `:`_ (which clearly isn't a _drive-based path_).\r\n\r\n@DHowett has pinpointed the problematic behavior to: https://github.com/PowerShell/PowerShell/blob/3effa204103460c996a8612aa70718fdf924047d/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs#L388-L406\r\n\r\n## Steps to reproduce\r\n\r\nOn Unix:\r\n\r\n```powershell\r\n/bin/echo :foo | Should -Be ':foo'\r\n```\r\n\r\nOn Windows:\r\n\r\n```\r\ncmd /c echo :foo | Should -Be ':foo'\r\n```\r\n\r\n## Expected behavior\r\n\r\nThe test should succeed.\r\n\r\n## Actual behavior\r\n\r\nThe test fails, because the the current location's path is unexpectedly prepended to `:`\r\n\r\n```powershell\r\nExpected strings to be the same, but they were different. Expected length: 4 Actual length: 44 Strings differ at index 0.\r\nExpected: ':foo' But was: '/Users/jdoe...'\r\n```\r\n\r\n## Environment data\r\n\r\n```none\r\nPowerShell Core 7.1.0-preview.7\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2020-09-15T23:26:04Z","url":"https://github.com/PowerShell/PowerShell/issues/13640"}
| 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:aa0a54bb-f7c6-556c-1d7c-8a58709e1164 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C77E:14FA53:706559:A2D61E:6AFD91BD |
| html-safe-nonce | f890a68e5d3dd7e47afc6ddc6bec660eb0b388994a3ec1f4f35f32ed50b843c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzdFOjE0RkE1Mzo3MDY1NTk6QTJENjFFOjZBRkQ5MUJEIiwidmlzaXRvcl9pZCI6IjU4NjU5OTQzOTM5Njk1OTQ4MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 106eea48e9893ac061241a01d60c3fceeb6902943aa6859220b6a7c6906aba25 |
| hovercard-subject-tag | issue:702336113 |
| 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/13640/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55b8a994f989fe8308aca71f3f934f80b67f161af559420bb4a8ac8c680075d1/PowerShell/PowerShell/issues/13640 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55b8a994f989fe8308aca71f3f934f80b67f161af559420bb4a8ac8c680075d1/PowerShell/PowerShell/issues/13640 |
| og:image:alt | PR #12386 introduced experimental feature PSNativePSPathResolution, which as of (at least) PowerShell Core 7.1.0-preview.7 has become a default feature. For problems with this feature in general, s... |
| 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