Merge pull request #12014 from carlocab/os-uname

os: add `uname` method
This commit is contained in:
Carlo Cabrera 2021-09-10 22:57:16 +08:00 committed by GitHub
commit 0f0c7102f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,14 @@ module OS
@kernel_version ||= Version.new(Utils.safe_popen_read("uname", "-r").chomp)
end
# Get the kernel name.
#
# @api public
sig { returns(String) }
def self.kernel_name
@kernel_name ||= Utils.safe_popen_read("uname", "-s").chomp
end
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
CI_GLIBC_VERSION = "2.23"