I've my own open-source CLI tool called surmagic. In my latest update, I've built on a different machine, which has an M1 CPU. Before and after publishing I've tested on that machine, via installing the homebrew. And it works as expected. After a while, I've tested on another machine that has an Intel CPU. And, I've been faced with this error:
> surmagic --version
zsh: bad CPU type in executable: surmagic
I know what this error means from other libraries that I've used before, but the problem is how to solve this error as a CLI tool provider is another question.
I need help with this. How to solve this forever.