mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Add a simple proc to detect windows locally
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
f32b8f7983
commit
8aad4abe0c
1 changed files with 5 additions and 0 deletions
|
@ -18,4 +18,9 @@ module Inspec
|
|||
require "etc" unless defined?(Etc)
|
||||
Etc.getpwuid.dir
|
||||
end
|
||||
|
||||
def self.locally_windows?
|
||||
require "rbconfig" unless defined?(RbConfig)
|
||||
RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue