Skip to content

Instantly share code, notes, and snippets.

Created October 29, 2018 21:15
What would you like to do?
aws_assume_role with brew-gem
# Background: aws_assume_role 1.2.1 fails to install in brew-gem by default with an error about being unable to
# find `rake`. The following is a crude hack/workaround:
brew install brew-gem ruby
AAR_BREWGEM_TMPDIR="$( mktemp -d 2>/dev/null || mktemp -d -t 'AAR_brewgem_tmpdir' )"
brew gem formula aws_assume_role 1.2.1 --homebrew-ruby | sed -e 's/\(cached_download\)/"rake", \1/' > "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb"
HOMEBREW_NO_AUTO_UPDATE=1 brew install "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment