diff options
author | Julian C. Dunn <jdunn@aquezada.com> | 2015-03-20 11:50:59 -0400 |
---|---|---|
committer | Julian C. Dunn <jdunn@aquezada.com> | 2015-03-20 11:50:59 -0400 |
commit | 98ff0ea675658ccac3f84f5ff366a329a5c58821 (patch) | |
tree | 8ce2dfb6d43d15b2ee560aa611e95ba5380b7eb8 /lib/chef/audit | |
parent | 56c6e6474416946d65dfa306edd89f076d5b3b7d (diff) | |
parent | 53051e9a7f2c07836e1509a551ffd85dc8ca7bec (diff) | |
download | chef-98ff0ea675658ccac3f84f5ff366a329a5c58821.tar.gz |
Merge pull request #3048 from juliandunn/fix-audit-mode-on-windows
Remove UNIX-specific assumptions from audit runner.
Diffstat (limited to 'lib/chef/audit')
-rw-r--r-- | lib/chef/audit/runner.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/audit/runner.rb b/lib/chef/audit/runner.rb index 13ba95428c..13c2823dca 100644 --- a/lib/chef/audit/runner.rb +++ b/lib/chef/audit/runner.rb @@ -79,11 +79,15 @@ class Chef require 'rspec' require 'rspec/its' require 'specinfra' + require 'specinfra/helper' + require 'specinfra/helper/set' require 'serverspec/helper' require 'serverspec/matcher' require 'serverspec/subject' require 'chef/audit/audit_event_proxy' require 'chef/audit/rspec_formatter' + + Specinfra::Backend::Cmd.send(:include, Specinfra::Helper::Set) end # Configure RSpec just the way we like it: @@ -136,9 +140,13 @@ class Chef end end - # Set up the backend for Specinfra/Serverspec. :exec is the local system. + # Set up the backend for Specinfra/Serverspec. :exec is the local system; on Windows, it is :cmd def configure_specinfra - Specinfra.configuration.backend = :exec + if Chef::Platform.windows? + Specinfra.configuration.backend = :cmd + else + Specinfra.configuration.backend = :exec + end end # Iterates through the control groups registered to this run_context, builds an |