-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
homebrew installs invalid keyring completion file, causing "usage: install" messages at shell startup #671
Comments
Looks like the issue is that the output of
|
Homebrew has now switched to shtab for keyring completions so a brew upgrade should address the symptoms for homebrew users. |
And that error message is indicating the problem. When running keyring without the
When running with the extra, it emits the completion logic:
It sounds like the homebrew recipe just needed to include the completion extra in its install. Since the only package installed by the completion extra is shtab, the presence or absence of that package will determine whether the completion generation completes or not. I do wonder if perhaps keyring should exit with a non-zero exit code here when the completion dependencies aren't present. Would that have helped catch this issue earlier (prior to release)? |
Yeah I think non-zero exit makes sense and also having the error message go to sys.stderr instead of stdout may prevent this kind of thing. |
Fixed in v25.0.1. |
Describe the bug
Homebrew seems to be installing an invalid completion file in
/opt/homebrew/etc/bash_completion.d/keyring
. These files are sourced at shell startup but the one homebrew is installing is not valid shell code. I'm not sure if the problem is here or in the homebrew package - the recent keyring package release on homebrew doesn't seem like the kind of change that could cause this, but I'm not sure.As a result of this when I open a new interactive shell session, I see:
Because the
bash_completion.d/keyring
launches/usr/bin/install
due to the case-insensitive filesystem nonsense on macOS.To Reproduce
Steps to reproduce the behavior:
brew install bash bash-completion keyring
cat $(brew --prefix)/etc/bash_completion.d/keyring
Expected behavior
A valid shell completion function definition should be in
bash_completion.d/keyring
or no file should be installed hereEnvironment
Additional context
Here's a trace of my shell startup showing the issue:
The text was updated successfully, but these errors were encountered: