diff options
author | Rob Redpath <rob.redpath@wwwh.com> | 2014-11-13 11:01:18 +0000 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-01-25 10:57:28 -0800 |
commit | 37e474e07333a18dc00579cf44ea5e15de4d80f1 (patch) | |
tree | 90d366ee835d27488ffe2e3795d28b6aed1a79b9 /lib | |
parent | 294c69c7181acfab0943cf0fd235b805435c4b65 (diff) | |
download | chef-37e474e07333a18dc00579cf44ea5e15de4d80f1.tar.gz |
Correct syntax for using Chef::Exceptions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/application/client.rb | 4 | ||||
-rw-r--r-- | lib/chef/exceptions.rb | 3 |
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 |