Duplicated /opt/homebrew/bin
entry in PATH
#5502
Replies: 2 comments 3 replies
-
What does |
Beta Was this translation helpful? Give feedback.
-
Running
Having that in my
Commenting out all of them I get no homebrew paths at all in PATH. Same as when all I had in there was the commented out So far nothing too surprising 🙂 Now things get more interesting. This whole thing only seems to be a problem in my editor's built-in terminals❗❗ With that in mind I only commented out the And on close inspection there are more PATH entries that get duplicated in the VSCode and Zed terminals, that don't get duplicated in iTerm2 or Terminal So I'm going to let homebrew off the the hook here 😀 and just assume this is an issue with VSCode and Zed |
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
When I run
echo $PATH | sed 's/:/\n/g'
I get this output:As you can see I have
/opt/homebrew/bin
(and sbin) in there twice. I think it should only be added once.I can edit
/etc/zprofile
to disablepath_helper
; like this:If I do that I only get the homebrew entries once in my PATH
But obviously I don't want to have to do that. I need the other paths I get from running
path_helper
Here's some more debugging info (
/etc/paths
and/etc/paths.d/
):I found this issue from last year Homebrew/brew#14560 that suggests running
script /tmp/zsh.log zsh -xl
. Doing that, and then looking at the logs I get (slightly trimmed in the middle):If I change my
~/.zprofile
to look like this I don't get any homebrew paths at all in PATHWhat can I do to only have the homebrew paths show up once in my PATH?
Beta Was this translation helpful? Give feedback.
All reactions