{"action":"created","issue":{"url":"https://api.github.com/repos/iron-io/ironcli/issues/14","labels_url":"https://api.github.com/repos/iron-io/ironcli/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/iron-io/ironcli/issues/14/comments","events_url":"https://api.github.com/repos/iron-io/ironcli/issues/14/events","html_url":"https://github.com/iron-io/ironcli/pull/14","id":75846602,"number":14,"title":"Add patch for windows architecture detection","user":{"login":"pyeremenko","id":696437,"avatar_url":"https://avatars.githubusercontent.com/u/696437?v=3","gravatar_id":"","url":"https://api.github.com/users/pyeremenko","html_url":"https://github.com/pyeremenko","followers_url":"https://api.github.com/users/pyeremenko/followers","following_url":"https://api.github.com/users/pyeremenko/following{/other_user}","gists_url":"https://api.github.com/users/pyeremenko/gists{/gist_id}","starred_url":"https://api.github.com/users/pyeremenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyeremenko/subscriptions","organizations_url":"https://api.github.com/users/pyeremenko/orgs","repos_url":"https://api.github.com/users/pyeremenko/repos","events_url":"https://api.github.com/users/pyeremenko/events{/privacy}","received_events_url":"https://api.github.com/users/pyeremenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"treeder","id":75826,"avatar_url":"https://avatars.githubusercontent.com/u/75826?v=3","gravatar_id":"","url":"https://api.github.com/users/treeder","html_url":"https://github.com/treeder","followers_url":"https://api.github.com/users/treeder/followers","following_url":"https://api.github.com/users/treeder/following{/other_user}","gists_url":"https://api.github.com/users/treeder/gists{/gist_id}","starred_url":"https://api.github.com/users/treeder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treeder/subscriptions","organizations_url":"https://api.github.com/users/treeder/orgs","repos_url":"https://api.github.com/users/treeder/repos","events_url":"https://api.github.com/users/treeder/events{/privacy}","received_events_url":"https://api.github.com/users/treeder/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-05-13T04:53:14Z","updated_at":"2015-05-14T09:36:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iron-io/ironcli/pulls/14","html_url":"https://github.com/iron-io/ironcli/pull/14","diff_url":"https://github.com/iron-io/ironcli/pull/14.diff","patch_url":"https://github.com/iron-io/ironcli/pull/14.patch"},"body":"Windows PowerShell is built for 32 bit arch. So PowerShell on x86 virtual machine tells:\r\n\r\n```\r\nC:\\Users\\admin\\Documents\\GitHub> uname\r\nMINGW32_NT-6.1\r\nC:\\Users\\admin\\Documents\\GitHub> uname -m\r\ni686\r\n```\r\n\r\n...as expected. But on real x64 installation of Windows 8.1 it also tells\r\n\r\n```\r\nfreeman@FREEMAN-ASUS> uname\r\nMINGW32_NT-8.1\r\nfreeman@FREEMAN-ASUS> uname -m\r\ni686\r\n```\r\n\r\n**There are several possible ways of Windows architecture detection**:\r\n\r\n* echo $ENV:PROCESSOR_ARCHITECTURE\r\n* [IntPtr]::Size\r\n\r\nFirst seems to be preferable because on Linux it doesn't cause errors and just tells `:PROCESSOR_ARCHITECTURE`"},"comment":{"url":"https://api.github.com/repos/iron-io/ironcli/issues/comments/101984535","html_url":"https://github.com/iron-io/ironcli/pull/14#issuecomment-101984535","issue_url":"https://api.github.com/repos/iron-io/ironcli/issues/14","id":101984535,"user":{"login":"pyeremenko","id":696437,"avatar_url":"https://avatars.githubusercontent.com/u/696437?v=3","gravatar_id":"","url":"https://api.github.com/users/pyeremenko","html_url":"https://github.com/pyeremenko","followers_url":"https://api.github.com/users/pyeremenko/followers","following_url":"https://api.github.com/users/pyeremenko/following{/other_user}","gists_url":"https://api.github.com/users/pyeremenko/gists{/gist_id}","starred_url":"https://api.github.com/users/pyeremenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyeremenko/subscriptions","organizations_url":"https://api.github.com/users/pyeremenko/orgs","repos_url":"https://api.github.com/users/pyeremenko/repos","events_url":"https://api.github.com/users/pyeremenko/events{/privacy}","received_events_url":"https://api.github.com/users/pyeremenko/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T09:36:10Z","updated_at":"2015-05-14T09:36:10Z","body":"**UPD:** \r\n\r\nBoth `echo $ENV:PROCESSOR_ARCHITECTURE` and `[IntPtr]::Size` returns 32 on x64 machines in some cases.\r\n\r\n`(Get-WmiObject Win32_OperatingSystem).OSArchitecture` seems to work better"}}