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

Shell completion bash version check fail in git-bash on windows #2638

Closed
koliyo opened this issue Nov 29, 2023 · 0 comments · Fixed by #2639
Closed

Shell completion bash version check fail in git-bash on windows #2638

koliyo opened this issue Nov 29, 2023 · 0 comments · Fixed by #2639
Milestone

Comments

@koliyo
Copy link

koliyo commented Nov 29, 2023

I'm using windows with git-bash, and trying to set up bash shell completion following the readme.

I have added the following to my .bashrc

eval "$(_VREX_COMPLETE=bash_source vrex)"

But I get this error in new shell instances:

The file cannot be accessed by the system.

I have traced this to the subprocess execution of bash to check the version.

The problem is that the bash executable name is not working from my standard windows python installation.
Instead I need to explicitly add the full path to the git-bash executable, which is C:\Program Files\Git\bin\bash.exe

I have a working patch locally with using shutil.which('bash') to locate bash, which should work on all platforms. PR coming after this issue is submitted.

This is somewhat related to #2461, but that is a different issue, but both are specific to git-bash in windows.

Environment:

  • Python version: 3.12.0
  • Click version: 8.1.7
@davidism davidism added this to the 8.1.8 milestone Dec 4, 2024
@davidism davidism closed this as completed Dec 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants