Title: Fix parse error in Windows PowerShell by johlju · Pull Request #136 · PoshCode/ModuleBuilder · GitHub
Open Graph Title: Fix parse error in Windows PowerShell by johlju · Pull Request #136 · PoshCode/ModuleBuilder
X Title: Fix parse error in Windows PowerShell by johlju · Pull Request #136 · PoshCode/ModuleBuilder
Description: This will fix issue #135. In Windows PowerShell this will not work: @{ Version = if (($V = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[0])) { [version]$V } Prerelease = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[1] BuildMetadata = $BuildInfo.SemVer.Split("+", 2)[1] } but this will: @{ Prerelease = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[1] BuildMetadata = $BuildInfo.SemVer.Split("+", 2)[1] Version = if (($V = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[0])) { [version]$V } } By moving the Version property at the end there is no parse error. This error does not occur on PowerShell 7.x. It handles if-blocks in hashtables better apparently.
Open Graph Description: This will fix issue #135. In Windows PowerShell this will not work: @{ Version = if (($V = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[0])) { ...
X Description: This will fix issue #135. In Windows PowerShell this will not work: @{ Version = if (($V = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[0])) { ...
Opengraph URL: https://github.com/PoshCode/ModuleBuilder/pull/136
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0b23c42d-6976-0837-c0ce-33af1e15086f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 92E8:1857DE:98CB30:D9381E:697A2403 |
| html-safe-nonce | fe4f578918f97365cf3087bfb2b91fab6979494bf8fc494d3dacfa740f8605d6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkU4OjE4NTdERTo5OENCMzA6RDkzODFFOjY5N0EyNDAzIiwidmlzaXRvcl9pZCI6Ijg4OTYyMjMyMTE0NTY5NjM1ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d4e19e0f8b96c1b983ea56dfca687e5379908af3157cc7177df84134c66351b2 |
| hovercard-subject-tag | pull_request:2351371498 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/PoshCode/ModuleBuilder/pull/136/files |
| twitter:image | https://avatars.githubusercontent.com/u/7189721?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/7189721?s=400&v=4 |
| og:image:alt | This will fix issue #135. In Windows PowerShell this will not work: @{ Version = if (($V = $BuildInfo.SemVer.Split("+")[0].Split("-", 2)[0])) { ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e45f4a1aa1d2f5e476694a8ca3079eb927f0ea276035a2d5e78665f09121ff98 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/PoshCode/ModuleBuilder git https://github.com/PoshCode/ModuleBuilder.git |
| octolytics-dimension-user_id | 5641451 |
| octolytics-dimension-user_login | PoshCode |
| octolytics-dimension-repository_id | 18412121 |
| octolytics-dimension-repository_nwo | PoshCode/ModuleBuilder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18412121 |
| octolytics-dimension-repository_network_root_nwo | PoshCode/ModuleBuilder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8a5f67754bd81296f454ff3fa910631e09e4052c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width