system config: don't print WSL info on non-WSL systems
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
55c82749ad
commit
84911edbed
@ -41,9 +41,9 @@ module SystemConfig
|
||||
end
|
||||
|
||||
def wsl_version(kernel)
|
||||
return "no" unless /-microsoft/i.match?(kernel)
|
||||
return unless /-microsoft/i.match?(kernel)
|
||||
|
||||
return "2 (store)" if Version.new kernel[/Linux ([0-9.]*)-.*/, 1] > Version.new("5.15")
|
||||
return "2 (Microsoft Store)" if Version.new(kernel[/Linux ([0-9.]*)-.*/, 1]) > Version.new("5.15")
|
||||
return "2" if /-microsoft/.match?(kernel)
|
||||
return "1" if /-Microsoft/.match?(kernel)
|
||||
end
|
||||
@ -53,7 +53,9 @@ module SystemConfig
|
||||
dump_generic_verbose_config(out)
|
||||
out.puts "Kernel: #{kernel}"
|
||||
out.puts "OS: #{OS::Linux.os_version}"
|
||||
out.puts "WSL: #{wsl_version(kernel)}"
|
||||
if (wsl = wsl_version(kernel).presence)
|
||||
out.puts "WSL: #{wsl}"
|
||||
end
|
||||
out.puts "Host glibc: #{host_glibc_version}"
|
||||
out.puts "/usr/bin/gcc: #{host_gcc_version}"
|
||||
out.puts "/usr/bin/ruby: #{host_ruby_version}" if RUBY_PATH != HOST_RUBY_PATH
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user