Title: Dash as a parameter crashes PWSH · Issue #9362 · PowerShell/PowerShell · GitHub
Open Graph Title: Dash as a parameter crashes PWSH · Issue #9362 · PowerShell/PowerShell
X Title: Dash as a parameter crashes PWSH · Issue #9362 · PowerShell/PowerShell
Description: PowerShell 6.2.0 on Windows 10 Steps to reproduce test.ps1 [CmdletBinding()]param( [string]$p1, [string]$p2, [Parameter(ValueFromPipeline)][string]$InputObject ) process{ $input.replace($p1, $p2) } Run the following from CMD: echo hello ...
Open Graph Description: PowerShell 6.2.0 on Windows 10 Steps to reproduce test.ps1 [CmdletBinding()]param( [string]$p1, [string]$p2, [Parameter(ValueFromPipeline)][string]$InputObject ) process{ $input.replace($p1, $p2) }...
X Description: PowerShell 6.2.0 on Windows 10 Steps to reproduce test.ps1 [CmdletBinding()]param( [string]$p1, [string]$p2, [Parameter(ValueFromPipeline)][string]$InputObject ) process{ $input.replace($p1, $p2) }...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/9362
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dash as a parameter crashes PWSH","articleBody":"PowerShell 6.2.0 on Windows 10\r\n\r\n# Steps to reproduce\r\n**test.ps1**\r\n```powershell\r\n[CmdletBinding()]param(\r\n [string]$p1,\r\n [string]$p2,\r\n [Parameter(ValueFromPipeline)][string]$InputObject\r\n)\r\nprocess{\r\n $input.replace($p1, $p2)\r\n}\r\n```\r\nRun the following from CMD:\r\n```none\r\necho hello world | powershell -f test.ps1 e E\r\nhEllo world\r\necho hello world | powershell -f test.ps1 e -\r\nCRA$H@#*\r\necho hello world | powershell -f test.ps1 e \"-\"\r\nCRA$H@#*\r\n```\r\n`CRA$H@#*` = PowerShell crashes\r\n\r\n\r\n# Expected behavior\r\n\r\n```\r\nh-llo world\r\n```\r\n\r\n# Actual behavior\r\nCRASH of pwsh.exe !\r\n\r\n# Environment data\r\n\r\n```\r\nName Value\r\n---- -----\r\nPSVersion 6.2.0\r\nPSEdition Core\r\nGitCommitId 6.2.0\r\nOS Microsoft Windows 10.0.16299\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n","author":{"url":"https://github.com/cawoodm","@type":"Person","name":"cawoodm"},"datePublished":"2019-04-15T12:39:45Z","url":"https://github.com/PowerShell/PowerShell/issues/9362"}
| 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:14f5168c-4e84-0f66-28ca-700a2d820326 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEF4:1BB1CE:5F7F2:8165B:6AFD48A7 |
| html-safe-nonce | 09881a4709bfa75c7a1a51f03fae7266a45ba17a71f68fd291608e0295b5b190 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUY0OjFCQjFDRTo1RjdGMjo4MTY1Qjo2QUZENDhBNyIsInZpc2l0b3JfaWQiOiIzMzQ3MzYwNjgzMjI5MjY4MTM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ee5eca76848bf436ff3af8c97fb108cc90bb5d9af866511cfeb2556a39ec5c1a |
| hovercard-subject-tag | issue:433259456 |
| 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/9362/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1fb18a22239206ceb3e524dcb566d5515b043683a2ef1981d60fdddfbd57aea3/PowerShell/PowerShell/issues/9362 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1fb18a22239206ceb3e524dcb566d5515b043683a2ef1981d60fdddfbd57aea3/PowerShell/PowerShell/issues/9362 |
| og:image:alt | PowerShell 6.2.0 on Windows 10 Steps to reproduce test.ps1 [CmdletBinding()]param( [string]$p1, [string]$p2, [Parameter(ValueFromPipeline)][string]$InputObject ) process{ $input.replace($p1, $p2) }... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cawoodm |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| 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 | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width