summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-13 07:28:34 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-13 07:28:34 -0800
commit5e5cbe6df61ae69b9a5942ce51a7ad1f8bb6ea3a (patch)
tree2b4b01ceb6e4aa182107ac7f1443118c6b5294ed
parente42f1c30f98ba3adc1437e4f2a9e460f3efb8502 (diff)
parent3fa247386be7523a2b488d65dfe35cf753bd9802 (diff)
downloadchef-5e5cbe6df61ae69b9a5942ce51a7ad1f8bb6ea3a.tar.gz
Merge pull request #4390 from chef/tm/fix_fail
Correct uses of fail to raise
-rw-r--r--chef-config/lib/chef-config/package_task.rb2
-rw-r--r--lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb2
-rw-r--r--lib/chef/provider/package/windows.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/package_task.rb b/chef-config/lib/chef-config/package_task.rb
index 0aa063a2ff..2e9b36d939 100644
--- a/chef-config/lib/chef-config/package_task.rb
+++ b/chef-config/lib/chef-config/package_task.rb
@@ -105,7 +105,7 @@ module ChefConfig
end
def define
- fail 'Need to provide package root and module name' if root_path.nil? || module_name.nil?
+ raise 'Need to provide package root and module name' if root_path.nil? || module_name.nil?
desc 'Build Gems of component dependencies'
task :package_components do
diff --git a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb
index 4391bdbfcd..ded390fa8d 100644
--- a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb
+++ b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb
@@ -37,7 +37,7 @@ class Chef
# want to spend a lot of time adding code to the main Chef libraries
if root.versioned_cookbooks
canonical_name = canonical_cookbook_name(File.basename(file_path))
- fail "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless canonical_name
+ raise "When versioned_cookbooks mode is on, cookbook #{file_path} must match format <cookbook_name>-x.y.z" unless canonical_name
# KLUDGE: We shouldn't have to use instance_variable_set
loader.instance_variable_set(:@cookbook_name, canonical_name)
diff --git a/lib/chef/provider/package/windows.rb b/lib/chef/provider/package/windows.rb
index 43972c933c..f9ff50dcc6 100644
--- a/lib/chef/provider/package/windows.rb
+++ b/lib/chef/provider/package/windows.rb
@@ -115,7 +115,7 @@ class Chef
if basename == 'setup.exe'
:installshield
else
- fail Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.name}' not specified and cannot be determined from file extension '#{file_extension}'"
+ raise Chef::Exceptions::CannotDetermineWindowsInstallerType, "Installer type for Windows Package '#{new_resource.name}' not specified and cannot be determined from file extension '#{file_extension}'"
end
end
end