summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--CHANGELOG.md13
-rw-r--r--Gemfile.lock10
-rw-r--r--VERSION2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--lib/chef/cookbook/gem_installer.rb3
-rw-r--r--lib/chef/knife.rb12
-rw-r--r--lib/chef/knife/ssh.rb2
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/unit/cookbook/gem_installer_spec.rb4
10 files changed, 39 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index ac14a13e8e..2ee48bb270 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ tags
*~
.chef
results
+*.gem
# You should check in your Gemfile.lock in applications, and not in gems
external_tests/*.lock
@@ -61,3 +62,6 @@ nodes/
# chef-config
chef-config/.bundle
chef-config/Gemfile.lock
+
+# docs site generation from master
+docs_site/**
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 093e93ebd0..357d4b0411 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,17 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
-<!-- latest_release -->
+<!-- latest_release 14.14.16 -->
+## [v14.14.16](https://github.com/chef/chef/tree/v14.14.16) (2019-10-09)
+
+#### Merged Pull Requests
+- Fix for knife subcommand --help doesn&#39;t work as intended. [#8973](https://github.com/chef/chef/pull/8973) ([tas50](https://github.com/tas50))
<!-- latest_release -->
-<!-- release_rollup -->
+<!-- release_rollup since=14.14.14 -->
+### Changes not yet released to stable
+
+#### Merged Pull Requests
+- Fix for knife subcommand --help doesn&#39;t work as intended. [#8973](https://github.com/chef/chef/pull/8973) ([tas50](https://github.com/tas50)) <!-- 14.14.16 -->
+- Modify #8901 to not use arrays with mixlib-shellout [#8974](https://github.com/chef/chef/pull/8974) ([tas50](https://github.com/tas50)) <!-- 14.14.15 -->
<!-- release_rollup -->
<!-- latest_stable_release -->
diff --git a/Gemfile.lock b/Gemfile.lock
index fbbf0c4ca1..5d3f4fca72 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,10 +1,10 @@
PATH
remote: .
specs:
- chef (14.14.14)
+ chef (14.14.16)
addressable
bundler (>= 1.10)
- chef-config (= 14.14.14)
+ chef-config (= 14.14.16)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -31,10 +31,10 @@ PATH
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
- chef (14.14.14-universal-mingw32)
+ chef (14.14.16-universal-mingw32)
addressable
bundler (>= 1.10)
- chef-config (= 14.14.14)
+ chef-config (= 14.14.16)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -77,7 +77,7 @@ PATH
PATH
remote: chef-config
specs:
- chef-config (14.14.14)
+ chef-config (14.14.16)
addressable
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
diff --git a/VERSION b/VERSION
index d0fee9158b..c649bb7a0c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-14.14.14 \ No newline at end of file
+14.14.16 \ No newline at end of file
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index 9fd6998852..afe9c0e459 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -21,7 +21,7 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "14.14.14".freeze
+ VERSION = "14.14.16".freeze
end
#
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb
index 4b871b33b4..81181b2ff2 100644
--- a/lib/chef/cookbook/gem_installer.rb
+++ b/lib/chef/cookbook/gem_installer.rb
@@ -69,7 +69,8 @@ class Chef
# Skip installation only if Chef::Config[:skip_gem_metadata_installation] option is true
unless Chef::Config[:skip_gem_metadata_installation]
# Add additional options to bundle install
- cmd = [ "bundle", "install", Chef::Config[:gem_installer_bundler_options] ]
+ cmd = "bundle install"
+ cmd += " #{Chef::Config[:gem_installer_bundler_options]}" if Chef::Config[:gem_installer_bundler_options]
so = shell_out!(cmd, cwd: dir, env: { "PATH" => path_with_prepended_ruby_bin })
Chef::Log.info(so.stdout)
end
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index f645b85712..ef03b5730a 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -63,6 +63,12 @@ class Chef
attr_accessor :name_args
attr_accessor :ui
+ # knife acl subcommands are grouped in this category using this constant to verify.
+ OPSCODE_HOSTED_CHEF_ACCESS_CONTROL = %w{acl group user}.freeze
+
+ # knife opc subcommands are grouped in this category using this constant to verify.
+ CHEF_ORGANIZATION_MANAGEMENT = %w{opc}.freeze
+
# Configure mixlib-cli to always separate defaults from user-supplied CLI options
def self.use_separate_defaults?
true
@@ -269,7 +275,11 @@ class Chef
ui.info("If this is a recently installed plugin, please run 'knife rehash' to update the subcommands cache.")
end
- if category_commands = guess_category(args)
+ if CHEF_ORGANIZATION_MANAGEMENT.include?(args[0])
+ list_commands("CHEF ORGANIZATION MANAGEMENT")
+ elsif OPSCODE_HOSTED_CHEF_ACCESS_CONTROL.include?(args[0])
+ list_commands("OPSCODE HOSTED CHEF ACCESS CONTROL")
+ elsif category_commands = guess_category(args)
list_commands(category_commands)
elsif OFFICIAL_PLUGINS.include?(args[0]) # command was an uninstalled official chef knife plugin
ui.info("Use `chef gem install knife-#{args[0]}` to install the plugin into ChefDK")
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index ab7623a4d8..5b84f80123 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -620,7 +620,7 @@ class Chef
end
session.close
- if exit_status != 0
+ if exit_status && exit_status != 0
exit exit_status
else
exit_status
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 4f81cba9d3..361e4b48c6 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require "chef/version_string"
class Chef
CHEF_ROOT = File.expand_path("../..", __FILE__)
- VERSION = Chef::VersionString.new("14.14.14")
+ VERSION = Chef::VersionString.new("14.14.16")
end
#
diff --git a/spec/unit/cookbook/gem_installer_spec.rb b/spec/unit/cookbook/gem_installer_spec.rb
index 858710d952..efe12c9dbe 100644
--- a/spec/unit/cookbook/gem_installer_spec.rb
+++ b/spec/unit/cookbook/gem_installer_spec.rb
@@ -1,5 +1,5 @@
require "spec_helper"
-require "bundler/dsl"
+require "bundler"
describe Chef::Cookbook::GemInstaller do
let(:cookbook_collection) do
@@ -106,7 +106,7 @@ describe Chef::Cookbook::GemInstaller do
it "install from local cache when Chef::Config[:gem_installer_bundler_options] is set to local" do
Chef::Config[:gem_installer_bundler_options] = "--local"
- expect(gem_installer).to receive(:shell_out!).with(["bundle", "install", "--local"], any_args).and_return(shell_out)
+ expect(gem_installer).to receive(:shell_out!).with("bundle install --local", any_args).and_return(shell_out)
expect(Chef::Log).to receive(:info).and_return("")
expect(gem_installer.install).to be_empty
end