{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/4474","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/4474/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/4474/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/4474/events","html_url":"https://github.com/PowerShell/PowerShell/issues/4474","id":247586770,"number":4474,"title":"GetProcessorArchitecture in PSUtil.cs is not ported","user":{"login":"iSazonov","id":22290914,"avatar_url":"https://avatars2.githubusercontent.com/u/22290914?v=4","gravatar_id":"","url":"https://api.github.com/users/iSazonov","html_url":"https://github.com/iSazonov","followers_url":"https://api.github.com/users/iSazonov/followers","following_url":"https://api.github.com/users/iSazonov/following{/other_user}","gists_url":"https://api.github.com/users/iSazonov/gists{/gist_id}","starred_url":"https://api.github.com/users/iSazonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSazonov/subscriptions","organizations_url":"https://api.github.com/users/iSazonov/orgs","repos_url":"https://api.github.com/users/iSazonov/repos","events_url":"https://api.github.com/users/iSazonov/events{/privacy}","received_events_url":"https://api.github.com/users/iSazonov/received_events","type":"User","site_admin":false},"labels":[{"id":401720735,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Area-Engine","name":"Area-Engine","color":"5319e7","default":false},{"id":617835845,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Code%20Cleanup","name":"Issue-Code Cleanup","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-03T04:07:21Z","updated_at":"2018-05-09T14:36:39Z","closed_at":null,"author_association":"COLLABORATOR","body":"[GetProcessorArchitecture](https://github.com/PowerShell/PowerShell/blob/f0eda031d616760fd723c1db464ecd0585de5f27/src/System.Management.Automation/utils/PsUtils.cs#L536) uses Windows native API to detect a processor architecture.\r\n\r\nThis method is used in `ModuleCmdletBase.cs` to [test the required process architecture](https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs#L1867), and thus that code is broken on Unix platforms as GetProcessorArchitecture depends on a win32 API to get process architecture.\r\n\r\nWe should use CoreFX API `[System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture`."},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/387760636","html_url":"https://github.com/PowerShell/PowerShell/issues/4474#issuecomment-387760636","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/4474","id":387760636,"user":{"login":"iSazonov","id":22290914,"avatar_url":"https://avatars2.githubusercontent.com/u/22290914?v=4","gravatar_id":"","url":"https://api.github.com/users/iSazonov","html_url":"https://github.com/iSazonov","followers_url":"https://api.github.com/users/iSazonov/followers","following_url":"https://api.github.com/users/iSazonov/following{/other_user}","gists_url":"https://api.github.com/users/iSazonov/gists{/gist_id}","starred_url":"https://api.github.com/users/iSazonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSazonov/subscriptions","organizations_url":"https://api.github.com/users/iSazonov/orgs","repos_url":"https://api.github.com/users/iSazonov/repos","events_url":"https://api.github.com/users/iSazonov/events{/privacy}","received_events_url":"https://api.github.com/users/iSazonov/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T14:36:39Z","updated_at":"2018-05-09T14:36:39Z","author_association":"COLLABORATOR","body":"Seems we can catch more problems with the code - I see [CoreFX](https://github.com/dotnet/corefx/blob/bffef76f6af208e2042a2f27bc081ee908bb390b/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs#L85) has a workaround for Win8/8.1."}}
{"actor":{"display_login":"iSazonov"}}