diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-08 07:58:00 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-08 07:58:00 -0700 |
commit | 19adfd52154a227717ecb2823750dae4bc34a57c (patch) | |
tree | ba8ed7e5fa39ddbd10972ab7031d543feef6d755 /lib/chef/resource | |
parent | 1343bdfff0d54e20b923211f6697d42c484c1627 (diff) | |
parent | b16b6157be731425f922b911d8810e9996c6887a (diff) | |
download | chef-19adfd52154a227717ecb2823750dae4bc34a57c.tar.gz |
Merge pull request #2103 from opscode/jdmundrawala/issue-2027-master
We now check for powershell/dsc compat in provider.
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/dsc_script.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb index 2972ace1aa..76ac6659d6 100644 --- a/lib/chef/resource/dsc_script.rb +++ b/lib/chef/resource/dsc_script.rb @@ -28,12 +28,8 @@ class Chef super @allowed_actions.push(:run) @action = :run - if(run_context && Chef::Platform.supports_dsc?(run_context.node)) - @provider = Chef::Provider::DscScript - else - raise Chef::Exceptions::NoProviderAvailable, - "#{powershell_info_str(run_context)}\nPowershell 4.0 or higher was not detected on your system and is required to use the dsc_script resource." - end + @provider = Chef::Provider::DscScript + @resource_name = :dsc_script end def code(arg=nil) @@ -125,16 +121,6 @@ class Chef :kind_of => [ Integer ] ) end - - private - - def powershell_info_str(run_context) - if run_context && run_context.node[:languages] && run_context.node[:languages][:powershell] - install_info = "Powershell #{run_context.node[:languages][:powershell][:version]} was found on the system." - else - install_info = 'Powershell was not found.' - end - end end end end |