diff options
author | Vivek Singh <vivek.singh@msystechnologies.com> | 2020-01-24 01:52:34 +0530 |
---|---|---|
committer | Vivek Singh <vivek.singh@msystechnologies.com> | 2020-01-24 01:52:34 +0530 |
commit | 2cd1d3e7a9fb55eefdfb518acbbc9a1d927eadd4 (patch) | |
tree | 7576d6dc1901905b14d17a513e2145477e3322a5 | |
parent | e22c8a4e6207a188bcdb88182e588a68dc5cbde9 (diff) | |
download | chef-2cd1d3e7a9fb55eefdfb518acbbc9a1d927eadd4.tar.gz |
[chef-16] Remove the data bag secret short option
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r-- | lib/chef/knife/data_bag_secret_options.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/chef/knife/data_bag_secret_options.rb b/lib/chef/knife/data_bag_secret_options.rb index d94aa4aa50..43f60494ba 100644 --- a/lib/chef/knife/data_bag_secret_options.rb +++ b/lib/chef/knife/data_bag_secret_options.rb @@ -35,7 +35,6 @@ class Chef def self.included(base) base.option :secret, - short: "-s SECRET", long: "--secret SECRET", description: "The secret key to use to encrypt data bag item values. Can also be defaulted in your config with the key 'secret'.", # Need to store value from command line in separate variable - knife#merge_configs populates same keys @@ -80,16 +79,9 @@ class Chef end def validate_secrets - if has_cl_secret? - if opt_parser.default_argv.include?("-s") - ui.warn("Secret short option -s is deprecated and will remove in the future. Please use --secret instead. -") - end - - if has_cl_secret_file? - ui.fatal("Please specify only one of --secret, --secret-file") - exit(1) - end + if has_cl_secret? && has_cl_secret_file? + ui.fatal("Please specify only one of --secret, --secret-file") + exit(1) end if knife_config[:secret] && knife_config[:secret_file] |