[Fix] nvm_get_download_slug: better architecture selection for M1 Macs#2657
[Fix] nvm_get_download_slug: better architecture selection for M1 Macs#2657ljharb merged 2 commits intonvm-sh:masterfrom imaddi47:nvm-macm1-fix/arm64-compatibility
nvm_get_download_slug: better architecture selection for M1 Macs#2657Conversation
If the node version is below 16.0.0 then nvm will select x86_64 architecture, else arm64 architecture.
ljharb
left a comment
There was a problem hiding this comment.
Thanks! Does perhaps the section in the readme that talks about Rosetta need to be updated now?
I don't think this is the right time to do so. Perhaps most of the developers already installed the current version of nvm and do not bother updating fixes. Removing talks about Rosetta in the next version upgrades would be better. For now, we can put a note governing to upgrade nvm in the Rosetta section. Hope this makes sense!! |
nvm_get_download_slug: better architecture selection for M1 Macs
I think Maybe it is the right time to update the docs. |
Changed configuration in nvm_get_download_slug() function, made condition for darwin based OS running on arm64 arch i.e, MAC M1.
If so, then change HOST_ARCH to x64 so that NVM will fetch x64 arch package from node repository which is the only package node currently having for darwin systems but no arm64 based packages
Problem
Solutions Available
Solution
NVM working on mac m1 after making PR changes in nvm.sh