crytic / solc-select

Manage and switch between Solidity compiler versions
GNU Affero General Public License v3.0
746 stars 99 forks source link

feat: Include hint to user if Rosetta is not installed #168

Closed 0xPhaze closed 1 year ago

0xPhaze commented 1 year ago

Describe the issue:

If Rosetta is not installed on a M1/M2, running solc gives the error: "OSError: [Errno 86] Bad CPU type in executable". solc-select could include a hint if the user is trying to install solc without Rosetta available. Some search gave me this command to see whether Rosetta is installed

pgrep -q oahd && echo Rosetta is installed || echo Rosetta is NOT installed

The hint could include the message:

Rosetta can be installed by running:
```
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
```

Code example to reproduce the issue:

Version:

latest

Relevant log output:

No response