Skip to content
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

Bash Completions Kills Shell (Mac/Homebrew) #756

Closed
mrg opened this issue Dec 20, 2022 · 1 comment
Closed

Bash Completions Kills Shell (Mac/Homebrew) #756

mrg opened this issue Dec 20, 2022 · 1 comment
Milestone

Comments

@mrg
Copy link

mrg commented Dec 20, 2022

I'm not sure if the Homebrew packaging is maintained here (if not, maybe add a comment to the README), but after installing via Homebrew and adding source /usr/local/bin/mvnd-bash-completion.bash to my ~/.bash_login, all future shells were killed with:

Last login: Tue Dec 20 06:51:54 on ttys009
-bash: /usr/local/Cellar/mvnd/0.8.2/libexec/bin/mvnd-bash-completion.bash: Permission denied
-bash: exec: /usr/local/Cellar/mvnd/0.8.2/libexec/bin/mvnd-bash-completion.bash: cannot execute: Undefined error: 0

[Process completed]

Fortunately, I had other shells open and it was easy to undo. The contents of source /usr/local/bin/mvnd-bash-completion.bash are:

#!/bin/bash
JAVA_HOME="${JAVA_HOME:-/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home}" exec "/usr/local/Cellar/mvnd/0.8.2/libexec/bin/mvnd-bash-completion.bash"  "$@"

If I replaced /usr/local/bin/mvnd-bash-completion.bash with /usr/local/Cellar/mvnd/0.8.2/libexec/bin/mvnd-bash-completion.bash, the sourcing works, but isn't robust if the version number changes.

@gnodet
Copy link
Contributor

gnodet commented Jan 24, 2023

The home-brew package sources are at https://github.com/mvndaemon/homebrew-mvnd/tree/master.
I can't find where a file such as the one you have would come from, but I have the same locally, so I suppose it's generated by home-brew during the installation process. So I don't think the hardcoded version is a problem, as it will be updated by home-brew. I think the problem is that the /usr/local/Cellar/mvnd/0.8.2/libexec/bin/mvnd-bash-completion.bash has no executable flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants