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

More robust check of bash version #2639

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

koliyo
Copy link

@koliyo koliyo commented Nov 29, 2023

More robust check of bash version.

Specifically on windows with git-bash, where python is the normal windows python install

Also use --norc flag to avoid recursively loading .bashrc (which can happen when the click completion loading does not work properly)

Testing should not require any additional tests, but rather make sure to run the existing shell completion tests on multiple platforms, eg Linux, Mac, Windows. Or how do you otherwise recommend adding tests for this?

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

koliyo and others added 5 commits November 29, 2023 10:33
Specifically on windows with git-bash, where python is the normal windows python install

Also use `--norc` flag to avoid recursively loading .bashrc (which can happen when the click completion loading does not work properly)
@koliyo
Copy link
Author

koliyo commented Dec 19, 2023

Would appreciate some feedback if this is not considered completed. As mentioned, automated testing of this is very context specific, so not sure how, or if, this should be added.

Regarding tox test, tox actually fails locally on my mac, but in a completely unrelated section. NOTE: this also fails in main!

typing: commands[0]> mypy
src/click/utils.py:492: error: Statement is unreachable  [unreachable]
        return os.path.join(
        ^
src/click/_termui_impl.py:616: error: Statement is unreachable  [unreachable]
        try:
        ^
Found 2 errors in 2 files (checked 16 source files)
typing: exit 1 (19.01 seconds) /Users/nils/Work/misc/click> mypy pid=19222
typing: FAIL ✖ in 24.66 seconds

My branch has the same test result as main.

@aenglander aenglander added this to the 8.1.8 milestone May 21, 2024
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

Successfully merging this pull request may close these issues.

Shell completion bash version check fail in git-bash on windows
2 participants