summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Redpath <rob.redpath@wwwh.com>2014-11-13 11:01:18 +0000
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-25 10:57:28 -0800
commit37e474e07333a18dc00579cf44ea5e15de4d80f1 (patch)
tree90d366ee835d27488ffe2e3795d28b6aed1a79b9
parent294c69c7181acfab0943cf0fd235b805435c4b65 (diff)
downloadchef-37e474e07333a18dc00579cf44ea5e15de4d80f1.tar.gz
Correct syntax for using Chef::Exceptions
-rw-r--r--lib/chef/application/client.rb4
-rw-r--r--lib/chef/exceptions.rb3
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 5566c9e99c..fe75a09a3f 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -257,8 +257,8 @@ class Chef::Application::Client < Chef::Application
def reconfigure
super
- raise PIDFileLockfileMatch if Chef::Util::PathHelper.paths_eql? Chef::Config[:pid_file], Chef::Config[:lockfile]
-
+ raise Chef::Exceptions::PIDFileLockfileMatch Chef::Util::PathHelper.paths_eql? (Chef::Config[:pid_file] || '' ), (Chef::Config[:lockfile] || '')
+
Chef::Config[:specific_recipes] = cli_arguments.map { |file| File.expand_path(file) }
Chef::Config[:chef_server_url] = config[:chef_server_url] if config.has_key? :chef_server_url
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index 3274e896cb..0fa8696584 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -432,8 +432,7 @@ class Chef
class PIDFileLockfileMatch < RuntimeError
def initialize
- super "PID file and lockfile are not permitted to match." +
- "\n Specify a different location with --pid or --lockfile"
+ super "PID file and lockfile are not permitted to match. Specify a different location with --pid or --lockfile"
end
end
end