diff options
author | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-10-20 01:57:48 -0700 |
---|---|---|
committer | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-11-01 23:56:51 -0700 |
commit | 926517d92ec5c1ca823bb38c5ca68d9d4f67b6d8 (patch) | |
tree | ddc30de2eb1c695cdd44280ca4abcf9e94c83797 | |
parent | 59071489fd73b4388cc3f3b1bc1f8a43da133c56 (diff) | |
download | chef-926517d92ec5c1ca823bb38c5ca68d9d4f67b6d8.tar.gz |
Moved changes form client.rb to base.rb
Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
-rw-r--r-- | lib/chef/application/base.rb | 8 | ||||
-rw-r--r-- | lib/chef/application/client.rb | 12 |
2 files changed, 7 insertions, 13 deletions
diff --git a/lib/chef/application/base.rb b/lib/chef/application/base.rb index fc8511a04b..7365ecadec 100644 --- a/lib/chef/application/base.rb +++ b/lib/chef/application/base.rb @@ -254,7 +254,13 @@ class Chef::Application::Base < Chef::Application short: "-K KEY_FILE", long: "--validation_key KEY_FILE", description: "Set the validation key file location, used for registering new clients.", - proc: nil + proc: lambda { |argument| + if File.exist?(File.expand_path(argument)) + File.expand_path(argument) + else + argument + end + } option :client_key, short: "-k KEY_FILE", diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 9d8c7b6525..39ae7adaac 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -70,18 +70,6 @@ class Chef::Application::Client < Chef::Application::Base long: "--recipe-url=RECIPE_URL", description: "Pull down a remote archive of recipes and unpack it to the cookbook cache. Only used in local mode." - option :validation_key, - short: "-K KEY_FILE", - long: "--validation_key KEY_FILE", - description: "Set the validation key file location, used for registering new clients.", - proc: lambda { |argument| - if File.exist?(File.expand_path(argument)) - File.expand_path(argument) - else - argument - end - } - # Reconfigure the chef client # Re-open the JSON attributes and load them into the node def reconfigure |