charmbracelet / gum

A tool for glamorous shell scripts 🎀
MIT License
17.94k stars 339 forks source link

problem running binary from tarball on osx sonoma #605

Closed kennyg closed 2 months ago

kennyg commented 3 months ago

Describe the bug I'm trying to run the gum binary from the 0.14.1 release tarball and it won't launch. Gatekeeper says it was blocked from use because it is not from an identified developer. To Reproduce Steps to reproduce the behavior:

  1. Go to 'Download https://github.com/charmbracelet/gum/releases/download/v0.14.1/gum_0.14.1_Darwin_arm64.tar.gz'
  2. Expand tarball
  3. run gum --version
  4. See error “gum” can’t be opened because Apple cannot check it for malicious software.

Expected behavior it should display the version. The last version I can install is 0.13.0 which prints gum version v0.13.0 (a11d1ff).

Desktop (please complete the following information):

Additional context I first ran into the issue trying to install gum using mise and the asdf-gum plugin, https://github.com/lwiechec/asdf-gum and eventually traced the problem down to the release tarball artifact.

> codesign -dv --verbose=4 gum
Executable=~/Downloads/gum_0.14.1_Darwin_arm64/gum
Identifier=a.out
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=220990 flags=0x20002(adhoc,linker-signed) hashes=6903+0 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=720896
Hash type=sha256 size=32
CandidateCDHash sha256=007456edb699edc678fdf309cdbf63a0d44e3455
CandidateCDHashFull sha256=007456edb699edc678fdf309cdbf63a0d44e34551d0d8c7feeebb98b8416f864
Hash choices=sha256
CMSDigest=007456edb699edc678fdf309cdbf63a0d44e34551d0d8c7feeebb98b8416f864
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=23871488
Executable Segment flags=0x1
Page size=4096
CDHash=007456edb699edc678fdf309cdbf63a0d44e3455
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none
> spctl --assess -v gum
gum: rejected
caarlos0 commented 2 months ago

you should be able to right click it and run bypassing the issue, or xattr -d com.apple.quarantine gum

either way, this should be fixed on next release #612

meowgorithm commented 2 months ago

Actually, I believe binaries are being signed as of v0.14.2 which was released last week. If that's not the case please reopen this!