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

fix: use recommended way of updating Fish shell $PATH #16556

Merged
merged 3 commits into from Feb 19, 2024

Conversation

PauloPhagula
Copy link
Contributor

@PauloPhagula PauloPhagula commented Jan 31, 2024

Akin to #11349 rather than setting $PATH directly this change proposes using the fish_add_path builtin command which is the recommended as documented in the docs

See Fish docs [fishshell.com/docs/current/tutorial.html#path]> (https://fishshell.com/docs/current/tutorial.html#path).

A faster way is to use the fish_add_path function... The advantage is that
you don't have to go mucking around in files: just run this once at the
command line, and it will affect the current session and all future instances
too.

Or you can modify $fish_user_paths yourself, but you should be careful not
to append to it unconditionally in config.fish, or it will grow longer and
longer.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@Bo98
Copy link
Member

Bo98 commented Jan 31, 2024

Maybe want -P here because of #7215?

Probably don't need the set -q stuff either.

This PR does remove support for old fish prior to 2021 so need to make sure we're ok with that.

@PauloPhagula
Copy link
Contributor Author

@Bo98 thanks for your comments

Maybe want -P here because of #7215?

Added the flag

Probably don't need the set -q stuff either.

Sounds reasonable, but I'd rather keep the pattern, just in case. But if there's a strong opinion about doing it, I'm game too.

This PR does remove support for old fish prior to 2021 so need to make sure we're ok with that.

True, I think its OK given this has been discussed before in #11349 with maintainer saying that

I think if it works in the latest stable brew install fish that's sufficient.

@PauloPhagula PauloPhagula marked this pull request as ready for review January 31, 2024 17:21
@MikeMcQuaid MikeMcQuaid requested a review from Bo98 February 3, 2024 12:29
@Bo98
Copy link
Member

Bo98 commented Feb 4, 2024

Sounds reasonable, but I'd rather keep the pattern, just in case. But if there's a strong opinion about doing it, I'm game too.

Earlier PR also seemed OK with removing it: https://github.com/Homebrew/brew/pull/13175/files

@p-linnane
Copy link
Member

Rebased to resolve hanging jobs with the new macOS 14 runner.

Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use Fish but seems OK to me if people are OK with the backwards compatiblity question above.

@MikeMcQuaid MikeMcQuaid merged commit d33efcd into Homebrew:master Feb 19, 2024
24 checks passed
@MikeMcQuaid
Copy link
Member

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @PauloPhagula!


If people have backwards compatibility complaints: let's just revert this on the first complaint.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants