From 27359223e6ef662139f8601d0f97548ffb5a1dba Mon Sep 17 00:00:00 2001 From: Whitey McCarragher Date: Mon, 30 Jul 2018 11:56:57 -0400 Subject: [PATCH] added new underlying check --- lib/os.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/os.rb b/lib/os.rb index 793ceb0..f859a76 100644 --- a/lib/os.rb +++ b/lib/os.rb @@ -176,11 +176,12 @@ def self.bsd? end def self.windows? - ENV['OS'] == 'Windows_NT' + # Windows 10 WSL kernel versions are custom to Microsoft + ENV['OS'] == 'Windows_NT' || !(`uname -r` =~ /Microsoft/).nil? end def self.linux? - OS.host_os =~ /linux/ ? true : false + !windows? && OS.host_os =~ /linux/ ? true : false end end