youtype / awscliv2

Wrapper for dockerized AWS CLI v2
https://youtype.github.io/awscliv2/
MIT License
33 stars 5 forks source link

Fix installers.py for aarch64 #16

Closed alvdavi closed 2 years ago

alvdavi commented 2 years ago

The installers.py script relies on platform.architecture()[0] to differentiate between x86_64 and aarch64, however, that value will return 64bit for both.

Replaced the code to make use of platform.machine() that will provide different values.

Running on an x86_64 system:

$ python -c "import platform;print(platform.machine())"
x86_64

Running on an arm system:

$ python -c "import platform;print(platform.machine())"
aarch64

Without this patch awscliv2 will install the x86_64 on arm systems and fail to execute

vemel commented 2 years ago

Thank you for this fix! I am going to release it ASAP.