Markus Reiter
8274920217
Rename OS::Mac::Version
to MacOSVersion
.
2023-05-09 05:08:38 +02:00
Markus Reiter
a1efaf1864
Merge HeadVersion
and NullVersion
into Version
.
2023-05-09 01:13:54 +02:00
Douglas Eichelberger
24cf6076e8
brew style --fix
2023-04-24 20:42:39 -07:00
Douglas Eichelberger
7fdd75ad41
brew style --fix
2023-04-17 11:00:55 -07:00
Douglas Eichelberger
09c679e75f
Refactor module_function to reduce rbi need
2023-04-17 10:37:59 -07:00
Douglas Eichelberger
04fa6e24d7
Enable more typing
2023-03-13 09:08:56 -07:00
Issy Long
3e7a46f474
rubocop: Drop "v" from Naming/MethodParameterName
allowlist
...
- This was an easy fix, "v" => "version".
2023-03-08 14:40:55 +00:00
Maxim Belkin
2b008ae7fd
os/linux.rb: wsl_version: apply suggestions from code review
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-27 16:56:28 +00:00
Maxim Belkin
c9b289fc3d
Use 'wslview' instead of 'xdg-open' on Windows
2023-02-27 14:39:56 +00:00
Rylan Polster
b271ae151b
Cleanup
2022-06-29 11:47:57 -04:00
Rylan Polster
ac067eedb2
Create MacOSVersions
module
2022-06-29 11:34:49 -04:00
Rylan Polster
f38db6e100
Define MacOS::Version::SYMBOLS
on macOS and linux
2022-06-24 14:39:17 -04:00
Colin Dean
b632123d6b
Force UTF-8 encoding of lsb_release output
...
It's possible that the output may be encoded ASCII-8BIT, which cannot be automatically encoded to UTF-8 by Ruby's JSON library.
In this particular case, elementaryOS 6.1 returns `Jólnir` as a part of the lsb_release Description field.
Ruby's IO.popen would return this whole output in ASCII-8BIT.
When this description field was passed to homebrew-bundle to be written in a JSON lockfile,
Ruby throws an exception because it could not automatically reencode from ASCII-8BIT to UTF-8.
This may actually affect other output of the calls to the underlying `Utils.popen_read` but this may be the first thing to trigger it since
JSON requires UTF-8 output and nothing else using that function may require UTF-8.
Fixes #12689 12689
Fixes Homebrew/homebrew-bundle#1043
2022-01-09 21:12:52 -05:00
Bo Anderson
ffdd3644fd
os/linux: fix Version::NULL type mixup
2021-09-11 00:10:24 +01:00
Bo Anderson
20ff68a425
Fix brew style
.
2021-03-17 20:45:44 +00:00
Mike McQuaid
6225ecff78
os/linux: check for blank codename.
2020-12-02 11:54:59 +00:00
Maxim Belkin
4d672d1759
os/linux.rb: don't show codename when it's n/a
2020-12-01 10:36:08 -06:00
Markus Reiter
da9289eff0
Add more type signatures.
2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
Mike McQuaid
d2dcc41717
os/linux: add more Xcode stubs.
...
Saw these on a random user report.
2020-09-01 12:49:19 +01:00
Markus Reiter
5410701eff
Document OS::Mac
and OS::Linux
.
2020-08-26 03:13:59 +02:00
Mike McQuaid
90cf01e245
os/linux: add no-op MacOS.sdk_path method.
...
Fixes https://github.com/Homebrew/linuxbrew-core/issues/20938
2020-08-17 16:13:28 +01:00
Jonathan Chang
76709d82c5
Fix brew style
.
2020-07-13 23:24:14 +10:00
vidusheeamoli
d6e587453e
srb: resolve error 4015. 25 errors => 18 errors
2020-06-22 16:33:44 +05:30
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
...
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
6aca5a6c6d
os/linux: add MacOS::CLT.version.
...
This allows formulae with this to be read on Linux.
2020-04-30 16:07:55 +01:00
Bo Anderson
1fe0212ff2
os/mac: add sdk_root_needed? and sdk_for_formula
2020-04-07 17:22:13 +01:00
Dawid Dziurla
e097dcedb4
os/linux: implement sdk_path_if_needed
2020-03-10 16:24:17 +01:00
Mike McQuaid
47769f98f1
os/linux: add, use OS::Linux.os_version
...
Similar to MacOS.version. A bit cleaner for us here but also plan on
using this in Homebrew/homebrew-bundle.
2019-09-13 16:48:13 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files.
2019-04-20 13:27:36 +09:00
Mike McQuaid
d1ea6f38d3
Fix mutable constants violations.
2019-04-19 21:46:20 +09:00
EricFromCanada
4fd398b862
linux.rb: define language/languages methods
2019-03-26 17:14:12 -04:00
Mike McQuaid
170c5493a4
Update deprecations
...
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Shaun Jackman
c480dd39a9
Warn if os/linux is loaded on generic OS
2018-08-13 23:38:48 -07:00
Shaun Jackman
73ba9b3d88
Define OS::Mac on Linux
...
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.
2018-02-20 11:22:40 -08:00