Skip to content

Commit

Permalink
Add /opt/homebrew/bin for Apple Silicon Macs
Browse files Browse the repository at this point in the history
On Apple Silicon Macs, Homebrew installs to /opt/homebrew.

Fixes #160
  • Loading branch information
jeffbyrnes committed Mar 26, 2022
1 parent 39aa20e commit 519e763
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified Package Managers.alfredworkflow
Binary file not shown.
2 changes: 1 addition & 1 deletion info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3253,7 +3253,7 @@ The Python Package Index is very slow due to a lack on API and pagination. A min
<key>variables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}</string>

This comment has been minimized.

Copy link
@vitorgalvao

vitorgalvao Mar 27, 2022

You’re trying to do shell expansion inside a plist. The result is adding the literal string ${PATH} to your PATH, which is not what you want. Simply remove :${PATH} and it’ll work, the rest is enough.

This comment has been minimized.

Copy link
@jeffbyrnes

jeffbyrnes Mar 27, 2022

Author Collaborator

For sure, in the plist, it's not going to expand, but once Alfred reads this as an env var during execution, I’d expect it to interpolate the value?

In any case, it works whether this is correct or not, so I’ll remove it to clean things up.

This comment has been minimized.

Copy link
@vitorgalvao

vitorgalvao Mar 28, 2022

but once Alfred reads this as an env var during execution, I’d expect it to interpolate the value?

That would be a major source of bugs. Imagine you have a variable which contains the value $1 (as in one dollar) and it were expanded—suddenly it’s substituted by the first argument to your script and everything breaks. A string literal won’t be interpreted as code unless something like eval (to be avoided) comes into play. This isn’t just an Alfred thing, it’s expected behaviour.

<key>XDEBUG_TRIGGER</key>
<string>1</string>
</dict>
Expand Down

0 comments on commit 519e763

Please sign in to comment.