avalanche-cli
avalanche-cli copied to clipboard
Check MacOS arch so the arm64 package would not be used for x86-64
My MacOS is x86-64, and when I tried to run "avalanche network start", I got an error like this:
avalanchego-v1.13.0 installation successful
AvalancheGo path: /Users/calvin/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego
Booting Network. Wait until healthy...
Error: fork/exec /Users/calvin/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego: bad CPU type in executable
Then I found out that avalanche didn't provide pre-built package for MacOS x86-64 (only for MacOS arm64), but in source code it checked OS type only without checking for arch type.
This is the fix and accordingly added/fixed test cases.