Module: OS Private
- Defined in:
- extend/os/mac/tap.rb,
extend/os/mac/keg.rb,
extend/os/linux/keg.rb,
extend/os/mac/cleaner.rb,
extend/os/mac/cleanup.rb,
extend/os/mac/formula.rb,
extend/os/mac/readall.rb,
extend/os/mac/sandbox.rb,
extend/os/mac/cask/dsl.rb,
extend/os/mac/hardware.rb,
extend/os/linux/cleaner.rb,
extend/os/linux/cleanup.rb,
extend/os/linux/formula.rb,
extend/os/linux/install.rb,
extend/os/mac/reinstall.rb,
extend/os/mac/diagnostic.rb,
extend/os/linux/compilers.rb,
extend/os/linux/diagnostic.rb,
extend/os/mac/hardware/cpu.rb,
extend/os/mac/keg_relocate.rb,
extend/os/mac/utils/socket.rb,
extend/os/linux/cask/config.rb,
extend/os/mac/bundle/bundle.rb,
extend/os/mac/dev-cmd/tests.rb,
extend/os/mac/language/java.rb,
extend/os/mac/system_config.rb,
extend/os/mac/utils/bottles.rb,
extend/os/linux/hardware/cpu.rb,
extend/os/linux/keg_relocate.rb,
extend/os/mac/bundle/skipper.rb,
extend/os/mac/dev-cmd/bottle.rb,
extend/os/mac/extend/ENV/std.rb,
extend/os/linux/bundle/bundle.rb,
extend/os/linux/cask/caskroom.rb,
extend/os/linux/dev-cmd/tests.rb,
extend/os/linux/system_config.rb,
extend/os/mac/extend/pathname.rb,
extend/os/mac/linkage_checker.rb,
extend/os/mac/missing_formula.rb,
extend/os/mac/simulate_system.rb,
extend/os/linux/bundle/skipper.rb,
extend/os/linux/cask/installer.rb,
extend/os/linux/dev-cmd/bottle.rb,
extend/os/linux/extend/ENV/std.rb,
extend/os/mac/extend/ENV/super.rb,
extend/os/linux/cask/quarantine.rb,
extend/os/linux/extend/pathname.rb,
extend/os/linux/linkage_checker.rb,
extend/os/linux/simulate_system.rb,
extend/os/mac/development_tools.rb,
extend/os/mac/extend/ENV/shared.rb,
extend/os/mac/formula_installer.rb,
extend/os/linux/extend/ENV/super.rb,
extend/os/linux/development_tools.rb,
extend/os/linux/extend/ENV/shared.rb,
extend/os/mac/cask/artifact/moved.rb,
extend/os/mac/dependency_collector.rb,
extend/os/linux/dev-cmd/update-test.rb,
extend/os/mac/formula_cellar_checks.rb,
extend/os/linux/dependency_collector.rb,
extend/os/linux/formula_cellar_checks.rb,
extend/os/mac/cask/artifact/symlinked.rb,
extend/os/linux/cask/artifact/relocated.rb,
extend/os/mac/cask/artifact/abstract_uninstall.rb,
os.rb,
os/mac.rb,
os/linux.rb,
cask/macos.rb,
os/mac/sdk.rb,
os/linux/ld.rb,
os/linux/elf.rb,
os/mac/xcode.rb,
os/linux/glibc.rb,
os/linux/kernel.rb,
os/linux/libstdcxx.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Defined Under Namespace
Constant Summary collapse
- LINUX_CI_OS_VERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
See Linux-CI.md
"Ubuntu 22.04"- LINUX_GLIBC_CI_VERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"2.35"- LINUX_GLIBC_NEXT_CI_VERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
users below this version will be warned by
brew doctor "2.39"- LINUX_GCC_CI_VERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"12"- LINUX_LIBSTDCXX_CI_VERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"6.0.30"- LINUX_PREFERRED_GCC_COMPILER_FORMULA =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let("gcc@#{LINUX_GCC_CI_VERSION}".freeze, String)
- LINUX_PREFERRED_GCC_RUNTIME_FORMULA =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"gcc"- ISSUES_URL =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"https://docs.brew.sh/Troubleshooting"- PATH_OPEN =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
if OS::Linux.wsl? && (wslview = which("wslview").presence) wslview.to_s else "xdg-open" end.freeze
Class Method Summary collapse
-
.kernel_name ⇒ String
Get the kernel name.
-
.kernel_version ⇒ Version
Get the kernel version.
-
.linux? ⇒ Boolean
Check whether the operating system is Linux.
-
.mac? ⇒ Boolean
Check whether the operating system is macOS.
- .not_tier_one_configuration? ⇒ Boolean private
Class Method Details
.kernel_name ⇒ String
Get the kernel name.
41 42 43 44 |
# File 'os.rb', line 41 def self.kernel_name require "etc" @kernel_name ||= T.let(Etc.uname.fetch(:sysname), T.nilable(String)) end |
.kernel_version ⇒ Version
Get the kernel version.
32 33 34 35 |
# File 'os.rb', line 32 def self.kernel_version require "etc" @kernel_version ||= T.let(Version.new(Etc.uname.fetch(:release)), T.nilable(Version)) end |
.linux? ⇒ Boolean
Check whether the operating system is Linux.
22 23 24 25 26 |
# File 'os.rb', line 22 def self.linux? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] RbConfig::CONFIG["host_os"].include? "linux" end |
.mac? ⇒ Boolean
Check whether the operating system is macOS.
12 13 14 15 16 |
# File 'os.rb', line 12 def self.mac? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] RbConfig::CONFIG["host_os"].include? "darwin" end |
.not_tier_one_configuration? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
80 81 82 |
# File 'os.rb', line 80 def self.not_tier_one_configuration? !defined?(OS::ISSUES_URL) end |