Merge pull request #4951 from Axuba/dev-4924

Fix service not working correctly on windows machines
This commit is contained in:
James Stocks 2020-03-20 14:38:33 +00:00 committed by GitHub
commit 5ed032a487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,8 @@ module Inspec::Resources
os = inspec.os
platform = os[:name]
return WindowsSrv.new(inspec) if os.windows?
# Ubuntu
# @see: https://wiki.ubuntu.com/SystemdForUpstartUsers
# Ubuntu 15.04 : Systemd
@ -154,8 +156,6 @@ module Inspec::Resources
SysV.new(inspec, service_ctl)
when "mac_os_x"
LaunchCtl.new(inspec, service_ctl)
when "windows"
WindowsSrv.new(inspec)
when "freebsd"
BSDInit.new(inspec, service_ctl)
when "arch"