Closed spencerwilson closed 2 years ago
The launchd service that ships with Homebrew formula 0.9.8.4 fails when run. Its logs indicate:
% cat /tmp/homebrew.mxcl.aws-rotate-iam-keys.log /bin/bash: aws-rotate-iam-keys: command not found
Note: This is a distinct issue from #66 .
This is because Homebrew (on Apple Silicon Macs only) installs formula to /opt/homebrew,[^why] which is not on PATH when the service runs.
Fix for existing Apple Silicon Homebrew (default dir) installations:
patch "$(brew --prefix aws-rotate-iam-keys)/homebrew.mxcl.aws-rotate-iam-keys.plist" <<EOF 8c8 < <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> --- > <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> EOF brew services restart aws-rotate-iam-keys
[^why]: Rationale: Short is https://docs.brew.sh/FAQ#why-is-the-default-installation-prefix-opthomebrew-on-apple-silicon, longer is here: https://www.reddit.com/r/MacOS/comments/jw9guu/why_did_homebrew_move_from_usrlocalto_opthomebrew/)
Fixed by #62 Fixed by #63
any updates on this?
Sorry for the delay in following up on this, should be fixed now after merging #63
Symptom
The launchd service that ships with Homebrew formula 0.9.8.4 fails when run. Its logs indicate:
Note: This is a distinct issue from #66 .
Fix
This is because Homebrew (on Apple Silicon Macs only) installs formula to /opt/homebrew,[^why] which is not on PATH when the service runs.
Fix for existing Apple Silicon Homebrew (default dir) installations:
[^why]: Rationale: Short is https://docs.brew.sh/FAQ#why-is-the-default-installation-prefix-opthomebrew-on-apple-silicon, longer is here: https://www.reddit.com/r/MacOS/comments/jw9guu/why_did_homebrew_move_from_usrlocalto_opthomebrew/)
Fixed by #62 Fixed by #63