Mac Mini PATH configuration has /opt/homebrew/bin before ~/bin
Source type:
obs· Harvested: 2026-05-03 · Original date: 2026-05-03T01:36:51.417Z Metadata:{"project":"lunhsiangyuan","type":"discovery","obs_id":64933}
obs/64933 · discovery · 2026-05-03T01:36:51.417Z
Mac Mini PATH configuration has /opt/homebrew/bin before ~/bin
Investigation of shell configuration files revealed why the gog wrapper is not being used. The .zshenv file exports PATH twice: first adding $HOME/bin, then adding /opt/homebrew/bin. Each export prepends to the existing PATH, so the second export effectively puts /opt/homebrew/bin earlier in the search order than ~/bin. When the shell searches for the gog command, it finds /opt/homebrew/bin/gog first and never reaches ~/bin/gog. This explains why which gog returns /opt/homebrew/bin/gog instead of the wrapper.
Concepts: [“how-it-works”,“gotcha”,“problem-solution”]
Facts: [“.zshenv exports PATH=PATH first”,“.zshenv then exports PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH”,“Later PATH export prepends to existing PATH, giving /opt/homebrew/bin higher priority”,“.zshrc adds ~/.local/bin but loads after .zshenv”,“Final PATH order has /opt/homebrew/bin before ~/bin, causing wrapper to be bypassed”]
[← 回 Alfred Brain Hub]