-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zsh completion path check broke upgrade #9455
Comments
For the record, the following snippet on top of if [[ "$(lsof -p $$ | awk '$4 == "txt" && /\/zsh$/ { print $9 }')" == '/bin/zsh' ]]; then
return
fi If the fix involves using Homebrew's zsh, please indicate a way to detect in |
How do you suggest that we query |
My approach would be not to query it at all because we can't predict what user has in their config (including a completely broken config because they don't run zsh and don't care). Just display a message that they might need to add If we try to check, it should be safeguarded with timeouts, exit status checks (which also don't seem to be there because homebrew didn't mind when I just killed the hanging zsh), stdin redirected from |
I second this. I don't see an obvious reason why CI tests were skipped for #9404 |
My bad! |
@jottr No worries, thanks for the kind words! |
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I was trying to run
brew upgrade
, as i do daily, to upgrade installed softwareWhat happened (include command output)
It hanged. Multiple times.
Command output
This is the point when it hanged. I looked at
pstree
what it was doing:Killing
/bin/zsh
made it continue and emit a caveat:This repeated for every package that was installing ZSH completion functions.
What you expected to happen
I expected brew to run and upgrade my packages. I would be happy with an unnecessary notice about
site-functions
, or with no notice at all (even if it would be necessary), or with being able to turn the extra helpfulness off.I expected brew not to run an "interactive" shell when it's not interactive, in a wrong version. Homebrew was started from a zsh session, in zsh that brew itself installed, first on
$PATH
, and with$SHELL
set to/usr/local/bin/zsh
. Homebrew really went out of its way to pick the wrong zsh.I don't know if finding correct zsh would help. My
.zshrc
is complex, and interactive shells are supposed to be interactive. Maybe there would be a workaround, but it won't ever be universal, because I am allowed to putsleep 3600
in my.zshrc
for no reason and it shouldn't break Homebrew.Step-by-step reproduction instructions (by running
brew
commands)~/.zshrc
brew upgrade
orbrew install
of a package that has ZSH completionzsh -i
non-interactively using wrong zsh and get confused if zsh tries to be interactiveOutput of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: