inlets / inletsctl

Create inlets servers on the top cloud platforms
https://docs.inlets.dev/
MIT License
457 stars 63 forks source link

Wrong inlets-pro binary downloaded when using Apple Silicon machines #121

Closed starbops closed 1 year ago

starbops commented 1 year ago

Expected Behaviour

The command inletsctl download should help users install the right OS architecture inlet-pro binary.

Current Behaviour

$ go env | grep -E "GOOS|GOARCH"
GOARCH="arm64"
GOOS="darwin"

$ sudo inletsctl download -v
Password:
2023/02/01 15:29:07 https://github.com/inlets/inlets-pro/releases/tag/0.9.13
URL: https://github.com/inlets/inlets-pro/releases/download/0.9.13/inlets-pro-darwin.
Starting download of inlets-pro 0.9.13, this could take a few moments.
Download completed, make sure that /usr/local/bin is on your path.
  inlets-pro version

$ inlets-pro version
zsh: bad CPU type in executable: inlets-pro

$ file $(which inlets-pro)
/usr/local/bin/inlets-pro: Mach-O 64-bit executable x86_64

Possible Solution

Though I can download the inlets-pro binary with the correct URL, it's more convenient to have inletsctl download working normally.

The logic in buildFilename function should be enhanced.

Steps to Reproduce (for bugs)

See above.

Context

I want to download inlets-pro binary using inletsctl.

Your Environment

Darwin Test-Mac-mini.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64