From 3d0a97c0a83c67afa429aae02fdda94731f76d5d Mon Sep 17 00:00:00 2001 From: chrnorm <17420369+chrnorm@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:05:40 +0100 Subject: [PATCH] granted: install shell wrappers and assumego symlink The formula was only installing the granted binary. This left the package non-functional because the assume workflow requires three additional components that weren't being installed. The assume script is a POSIX shell wrapper that calls assumego and exports AWS credentials into the current shell environment. The assume.fish script does the same for fish shell. The assumego binary is accessed via symlink to the granted binary - the code checks argv[0] to determine behavior. Without these components, users couldn't actually assume AWS roles because the credentials wouldn't propagate to their shell session. This adds installation of scripts/assume and scripts/assume.fish from the source tree, and creates the assumego -> granted symlink during the install phase. --- Formula/g/granted.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Formula/g/granted.rb b/Formula/g/granted.rb index 1159a3b904182..80b948caf8bbf 100644 --- a/Formula/g/granted.rb +++ b/Formula/g/granted.rb @@ -20,6 +20,13 @@ class Granted < Formula def install ldflags = "-s -w -X github.com/common-fate/granted/internal/build.Version=#{version}" system "go", "build", *std_go_args(ldflags:), "./cmd/granted" + + # Install shell wrapper scripts + bin.install "scripts/assume" + bin.install "scripts/assume.fish" + + # Create assumego symlink + bin.install_symlink "granted" => "assumego" end test do