diff options
author | Tim Smith <tsmith@chef.io> | 2020-01-27 13:29:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-27 13:29:29 -0800 |
commit | 81e12b0f73ad979515fcfc6c22e9a84280fd5fdd (patch) | |
tree | c0bea4ff5ab0e2e7e5a2db374305511ae0b595e8 | |
parent | 8b78fe904689dd6539e308fb87bffe103fb852f1 (diff) | |
parent | c12ed4d2755c119555fac06accf66bf12ee7e3d0 (diff) | |
download | chef-81e12b0f73ad979515fcfc6c22e9a84280fd5fdd.tar.gz |
Merge pull request #9263 from MsysTechnologiesllc/VSingh/remove-data-bag-secret-short-option
[chef-16] Remove the data bag secret short option
-rw-r--r-- | lib/chef/knife/data_bag_secret_options.rb | 14 | ||||
-rw-r--r-- | spec/unit/knife/bootstrap_spec.rb | 2 |
2 files changed, 4 insertions, 12 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] diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 46415085bc..5a3d6a1475 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -382,7 +382,7 @@ describe Chef::Knife::Bootstrap do k end - let(:options) { ["--bootstrap-no-proxy", setting, "-s", "foo"] } + let(:options) { ["--bootstrap-no-proxy", setting] } let(:template_file) { File.expand_path(File.join(CHEF_SPEC_DATA, "bootstrap", "no_proxy.erb")) } |