Skip to content

Conversation

@sjackman
Copy link
Contributor

  • 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 tests with your changes locally?

@MikeMcQuaid
Copy link
Member

I'd rather we avoid any more of these until environment filtering is on by default. I think then we can just remove the hardcoded /usr/bin pretty much everywhere. Thoughts?

@sjackman
Copy link
Contributor Author

I think then we can just remove the hardcoded /usr/bin pretty much everywhere.

That would be awesome.

@sjackman sjackman closed this Nov 18, 2017
@sjackman sjackman deleted the patch branch November 18, 2017 21:01
@sjackman sjackman restored the patch branch November 18, 2017 21:09
@sjackman
Copy link
Contributor Author

sjackman commented Nov 18, 2017

Before I read your comment, I came up with a better solution using with_system_path. It may still be worth applying, even in advance of environment filtering. After environment filtering, we may be able to get rid of with_system_path and its callers.

@sjackman sjackman reopened this Nov 18, 2017
@sjackman sjackman force-pushed the patch branch 2 times, most recently from 6e456dc to 3c5e192 Compare November 19, 2017 01:56
@MikeMcQuaid
Copy link
Member

Before I read your comment, I came up with a better solution using with_system_path

I think this kinda changes the meaning of with_system_path, though.

Copy link
Member

Choose a reason for hiding this comment

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

Let's try just changing this to patch below and not use a variable (i.e. remove the /usr/bin). If it goes 💥
I'll revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got rid of the cmd variable. Did you mean also get rid of with_system_path?

Copy link
Member

Choose a reason for hiding this comment

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

@sjackman Yep; make this just remove /usr/bin/ and the variable usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I also replaced IO.popen with Utils.popen_write.

@sjackman
Copy link
Contributor Author

sjackman commented Nov 19, 2017

Before I read your comment, I came up with a better solution using with_system_path

I think this kinda changes the meaning of with_system_path, though.

You may not find the desired utility in /usr/bin or /bin on a Linux system, where it makes sense to use the brewed version of the utility, if it's installed. It could be renamed to with_sanitized_path.

@MikeMcQuaid MikeMcQuaid changed the title Use patch found in the PATH on non-macOS systems Use patch found in the PATH Nov 20, 2017
@MikeMcQuaid MikeMcQuaid merged commit defd38a into Homebrew:master Nov 20, 2017
@MikeMcQuaid
Copy link
Member

Thanks again @sjackman!

@sjackman sjackman deleted the patch branch November 20, 2017 16:20
@sjackman
Copy link
Contributor Author

No worries. Thanks for merging, Mike.

@MikeMcQuaid
Copy link
Member

@sjackman Now that environment filtering is on by default @sjackman you can feel free to do this anywhere else that makes sense (and remove a bunch of with_system_path usage, too.

@sjackman
Copy link
Contributor Author

Fantastic!

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
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 this pull request may close these issues.

2 participants