Title: Write-Output -NoEnumerate should not convert items in list to PSObject · Issue #8124 · PowerShell/PowerShell · GitHub
Open Graph Title: Write-Output -NoEnumerate should not convert items in list to PSObject · Issue #8124 · PowerShell/PowerShell
X Title: Write-Output -NoEnumerate should not convert items in list to PSObject · Issue #8124 · PowerShell/PowerShell
Description: Steps to reproduce → [int[]] $before = @(1,2,3,4) → $before.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32[] System.Array → $after = Write-Output $before -NoEnumerate → $after.GetType() IsPublic...
Open Graph Description: Steps to reproduce → [int[]] $before = @(1,2,3,4) → $before.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32[] System.Array → $after = Write-Output $before ...
X Description: Steps to reproduce → [int[]] $before = @(1,2,3,4) → $before.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32[] System.Array → $after = Write-Output $before ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/8124
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" Write-Output -NoEnumerate should not convert items in list to PSObject","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```none\r\n→ [int[]] $before = @(1,2,3,4)\r\n\r\n→ $before.GetType()\r\n\r\nIsPublic IsSerial Name BaseType\r\n-------- -------- ---- --------\r\nTrue True Int32[] System.Array\r\n\r\n→ $after = Write-Output $before -NoEnumerate\r\n\r\n→ $after.GetType()\r\n\r\nIsPublic IsSerial Name BaseType\r\n-------- -------- ---- --------\r\nTrue True PSObject[] System.Array\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n`$after`'s type should still be `Int32[]` because `Write-Output -NoEnumerate` should not mess with the contents of the array.\r\n\r\nActual behavior\r\n---------------\r\n\r\n`$after`'s type is `PSObject[]`\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.1.0\r\nPSEdition Core\r\nGitCommitId 6.1.0\r\nOS Darwin 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:59:21 PDT 2018; root:xnu-4903.201.2~4/RELEASE_X86_64\r\nPlatform Unix\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/TylerLeonhardt","@type":"Person","name":"TylerLeonhardt"},"datePublished":"2018-10-25T20:29:36Z","url":"https://github.com/PowerShell/PowerShell/issues/8124"}
| 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:c5ba643d-2fdd-4516-19e3-44e6ab9f1f11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDC2:20C5C5:114346:17F622:6AFD5CA9 |
| html-safe-nonce | 6da7412fa5a2d92febd88b92aa492502acd31c85de2d14d043f2e9c4ad71ce90 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREMyOjIwQzVDNToxMTQzNDY6MTdGNjIyOjZBRkQ1Q0E5IiwidmlzaXRvcl9pZCI6IjI3ODM0Njg0Nzg0MDc3MjgyOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7f4ac58d23dd346292c1fc3b787ac41c013a8f68a19ed1cd8c5f627d6c673228 |
| hovercard-subject-tag | issue:374119435 |
| 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/8124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cc250798b4dd90583ee7c880ed4c0373011f6161cae07bbba9b82bfb38490517/PowerShell/PowerShell/issues/8124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cc250798b4dd90583ee7c880ed4c0373011f6161cae07bbba9b82bfb38490517/PowerShell/PowerShell/issues/8124 |
| og:image:alt | Steps to reproduce → [int[]] $before = @(1,2,3,4) → $before.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32[] System.Array → $after = Write-Output $before ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TylerLeonhardt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width