Title: powershell -version 2 should return error · Issue #4834 · PowerShell/PowerShell · GitHub
Open Graph Title: powershell -version 2 should return error · Issue #4834 · PowerShell/PowerShell
X Title: powershell -version 2 should return error · Issue #4834 · PowerShell/PowerShell
Description: As far as I know, PowerShell v2 was recently declared deprecated. Thus, it normal to expect some kind of related errors in the latest v6. The behaviour is strange, though. If I try to invoke something (anything actually, including gibber...
Open Graph Description: As far as I know, PowerShell v2 was recently declared deprecated. Thus, it normal to expect some kind of related errors in the latest v6. The behaviour is strange, though. If I try to invoke someth...
X Description: As far as I know, PowerShell v2 was recently declared deprecated. Thus, it normal to expect some kind of related errors in the latest v6. The behaviour is strange, though. If I try to invoke someth...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4834
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"powershell -version 2 should return error","articleBody":"As far as I know, PowerShell v2 was recently declared deprecated.\r\nThus, it normal to expect some kind of related errors in the latest v6.\r\n\r\nThe behaviour is strange, though. If I try to invoke something (anything\r\nactually, including gibberish) with `-version 2` then PowerShell succeeds\r\n(`$LASTEXITCODE` is 0) and prints the same result `powershell v6.0.0-beta.7`.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n````powershell\r\n powershell -version 2 gibberish\r\n $LASTEXITCODE\r\n````\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nNon-zero `$LASTEXITCODE` and a clear error message.\r\n\r\nActual behavior\r\n---------------\r\n\r\nZero `$LASTEXITCODE` and some version-like text, the same regardless of a command.\r\n\r\n````\r\n powershell v6.0.0-beta.7\r\n 0\r\n````\r\n\r\nEnvironment data\r\n----------------\r\n\r\nPowerShell-6.0.0-beta.7-win-x64.zip\r\n\r\n````\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-beta\r\nPSEdition Core\r\nGitCommitId v6.0.0-beta.7\r\nOS Microsoft Windows 10.0.10586\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","author":{"url":"https://github.com/nightroman","@type":"Person","name":"nightroman"},"datePublished":"2017-09-14T05:22:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/4834/PowerShell/issues/4834"}
| 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:5a8cd6cc-883e-ed97-1899-e7fc5379f94e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E48E:1383A9:D845B2:13B1C36:6A57512C |
| html-safe-nonce | 2992cc76f87c207453b44a41a9c276ba9be1b33ac74463e3c17f0ffdb189fc34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDhFOjEzODNBOTpEODQ1QjI6MTNCMUMzNjo2QTU3NTEyQyIsInZpc2l0b3JfaWQiOiIxMjEwNTk3NTkxNDE2Nzg3MjQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6106db8aa30fbd37858c8b20bcebd4941fc3df69f618f543d8a3399ee15f6c77 |
| hovercard-subject-tag | issue:257598405 |
| 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/4834/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ce43495d055691a02ba9dc3b0872fa752e3bbb61139b82c6a06f280d5268785/PowerShell/PowerShell/issues/4834 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ce43495d055691a02ba9dc3b0872fa752e3bbb61139b82c6a06f280d5268785/PowerShell/PowerShell/issues/4834 |
| og:image:alt | As far as I know, PowerShell v2 was recently declared deprecated. Thus, it normal to expect some kind of related errors in the latest v6. The behaviour is strange, though. If I try to invoke someth... |
| 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 | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | 602250ea3b6dd8302a7220ef98adb828dbc807e4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width