-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Define OS::Mac on Linux #3820
Define OS::Mac on Linux #3820
Conversation
Define MacOS.version, MacOS.full_version, and MacOS::Xcode.version to Version::NULL on Linux so that brew readall succeeds and Homebrew/brew can tap Homebrew/core on Linux.
77a002d
to
73ba9b3
Compare
Hmmm... wouldn't it be better to define two new methods instead, i.e.
becomes
And make both of the methods return |
|
The primary intention of this patch is to make it possible to tap |
Four methods would be required, actually 🤔 :
|
Sure, but this is a hack. |
|
$ uname -s
Linux
$ cd $(brew --repo homebrew/core)/Formula
$ grep -w "MacOS.version <" * | wc -l
312
$ grep -w "MacOS.version <" * | grep 'OS.mac?' | wc -l
14 |
I agree, let's keep with this approach. @sjackman Does this patch enable an otherwise unpatched Homebrew/brew to |
This is caused by spaghetti formulae that attempt to interweave macOS and Linux support and/or reuse macOS formulae from Homebrew/homebrew-core. |
afe0c3e
to
157f84a
Compare
Thanks again @sjackman! |
Yes. Thanks for merging, Mike! |
Define
OS::Mac
on Linux for formula API compatibility.brew style
with your changes locally?brew tests
with your changes locally?Define
MacOS.version
,MacOS.full_version
, andMacOS::Xcode.version
toVersion::NULL
on Linux so thatbrew readall
succeeds andHomebrew/brew
can tapHomebrew/core
on Linux.