Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Homebrew path for Apple Silicon #71

Conversation

indiependente
Copy link

Issue

When executed as a service on macOS on an Apple Silicon machine, the script is not able to find the brew binary due to it being located under /opt/homebrew/bin/.

Proof of this is visible in the /tmp/homebrew.mxcl.aws-rotate-iam-keys.log log file:

➜  ~ cat /tmp/homebrew.mxcl.aws-rotate-iam-keys.log
GNU's enhanced getopt is required to run this script
You can usually find this in the util-linux package
On MacOS see homebrew's package: http://brewformulas.org/Gnu-getopt
For anyone else, build from source: http://frodo.looijaard.name/project/getopt

The output can be misleading because it fails on the first part of the if condition where it tries to identify the brew binary but fails.

Hence the script won't work if scheduled as a service.

Solution

Adding the Apple Silicon Homebrew binary path to the Plist file in the Environment variables section fixes the problem.

@mmrwoods
Copy link
Collaborator

Fixed by #76

@mmrwoods mmrwoods closed this Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants