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

Remove linuxbrew from path when detecting shell #6213

Closed
wants to merge 1 commit into from

Conversation

JoshStern
Copy link
Contributor

@JoshStern JoshStern commented Jul 29, 2024

The issue

Installing shells through linuxbrew are always detected as nu shells because of the substring check.

The fix

Split cmd by .linuxbrew to avoid having it in the check.

This only fixes the specific case of installing things via brew. #6212 offers a broader fix if cmd contains other shell names anywhere in the path. It comes with a higher risk of breaking setups though (maybe worth saving for a major release).

The checklist

  • Associated issue: Linuxbrew shells are detected as nu shell #6197
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Addresses issue: pypa#6197

This updates the check to only look at the path after linuxbrew if it is
present.
@oz123
Copy link
Contributor

oz123 commented Jul 30, 2024

Closing in favour of #6212

@oz123 oz123 closed this Jul 30, 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.

2 participants