munkireport / munkireport-php

A reporting tool for munki
MIT License
393 stars 138 forks source link

Updated method to get CPU arch to get it from the full uname string #1481

Closed jc0b closed 2 years ago

jc0b commented 2 years ago

This PR changes how the main runner grabs the CPU arch, as using os.uname()[4] is unreliable when used with Rosetta 2 on Apple Silicon.

Instead, we just search the uname string provided by os.uname()[3], and lowercase it to match existing data.

I have tested this with the arm64 and x86_64 strings, but I don't have a physical machine to test i386 with 😅