inlets / inletsctl

Create inlets servers on the top cloud platforms

Home Page:https://docs.inlets.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong inlets-pro binary downloaded when using Apple Silicon machines

starbops opened this issue · comments

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

  • inlets Pro version inlets-pro version

  • inletsctl version inletsctl version 0.8.19

  • Cloud provider and region being used

  • Operating System and version (e.g. Linux, Windows, MacOS): uname -a

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
  • Link to your project or a code example to reproduce issue: