diff options
author | John Keiser <john@johnkeiser.com> | 2015-06-29 12:45:31 -0600 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-30 11:18:41 -0600 |
commit | 097d130a8761bca6e9f79934b0cffd2d151b302b (patch) | |
tree | 86194c05ab0b025ce0499758dd54b79691352da0 /lib/chef/provider | |
parent | 079f5794af116acb4a32124684fc8965b5ba53ee (diff) | |
download | chef-097d130a8761bca6e9f79934b0cffd2d151b302b.tar.gz |
Rename NoProviderAvailable to ProviderNotFound, add alias
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/dsc_resource.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/dsc_script.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 5fa84a21e9..379369ba6e 100644 --- a/lib/chef/provider/dsc_resource.rb +++ b/lib/chef/provider/dsc_resource.rb @@ -53,7 +53,7 @@ class Chef requirements.assert(:run) do |a| a.assertion { supports_dsc_invoke_resource? } err = ["You must have Powershell version >= 5.0.10018.0 to use dsc_resource."] - a.failure_message Chef::Exceptions::NoProviderAvailable, + a.failure_message Chef::Exceptions::ProviderNotFound, err a.whyrun err + ["Assuming a previous resource installs Powershell 5.0.10018.0 or higher."] a.block_action! @@ -63,7 +63,7 @@ class Chef meta_configuration['RefreshMode'] == 'Disabled' } err = ["The LCM must have its RefreshMode set to Disabled. "] - a.failure_message Chef::Exceptions::NoProviderAvailable, err.join(' ') + a.failure_message Chef::Exceptions::ProviderNotFound, err.join(' ') a.whyrun err + ["Assuming a previous resource sets the RefreshMode."] a.block_action! end diff --git a/lib/chef/provider/dsc_script.rb b/lib/chef/provider/dsc_script.rb index a75e68a475..b2432132b7 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -70,7 +70,7 @@ class Chef "Powershell 4.0 or higher was not detected on your system and is required to use the dsc_script resource.", ] a.assertion { supports_dsc? } - a.failure_message Chef::Exceptions::NoProviderAvailable, err.join(' ') + a.failure_message Chef::Exceptions::ProviderNotFound, err.join(' ') a.whyrun err + ["Assuming a previous resource installs Powershell 4.0 or higher."] a.block_action! end |