Closed carter-lavering closed 2 years ago
Never mind! Found details in #158 that helped fix my issue, by adding a PATH workflow environment variable with /opt/homebrew/bin:$PATH
. All is working now!
And through further trial and error (and reading) I have found that $PATH
expansion is not supported, so even though search seemed to be working at first glance, nothing else was. I've replaced $PATH
with /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
(again, per #158) and everything works now.
@carter-lavering so yeah, Alfred’s owners/maintainers set it up so that Alfred uses its own internal logic (not $PATH
) and if it finds PHP at one of the two locations Homebrew uses by default (/usr/local/bin
on Intel Macs, /opt/local/bin
on Apple Silicon Macs) it uses that location, otherwise it falls back to /usr/bin/php
, the old location on pre-Monterey macOS.
I'm running Apple Silicon and my Homebrew installed to /usr/homebrew/bin
(which, according to the Homebrew docs, is the default), but I guess I need to take that up with the Alfred devs and not here. Thanks for the clarification!
This has gotta be something so basic that I am overlooking, as I'm somewhat unfamiliar with scripting and such. It seems like Alfred isn't able to read my PATH variable and figure out where php is. If I run
php
from a terminal window (either bash or zsh) it opens just fine, but trying to search any repo with this workflow immediately crashes:Every repo I've tried throws an error identical to this. It seems like it might be a permissions issue, but Alfred has Automation and Full Disk Access permissions.
Sorry that this is somewhat off topic, I just wasn't sure where else to ask. Thanks!