summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-09-09 09:34:03 -0700
committerGitHub <noreply@github.com>2020-09-09 09:34:03 -0700
commit56f3c2bbc5e3558ec760669ffd6a54006fcd49eb (patch)
tree202b3f59030901b76812a11b0541ea996e9fb39b /lib
parent890e87762dae8e6f0e19e9f79f023952922c611c (diff)
parentf96673b21045a29fb09b9ed23a51e8aee3df139f (diff)
downloadchef-56f3c2bbc5e3558ec760669ffd6a54006fcd49eb.tar.gz
Merge pull request #10400 from chef/VSingh/fix-windows-test-cases
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/application/knife.rb9
-rw-r--r--lib/chef/dist.rb6
-rw-r--r--lib/chef/formatters/doc.rb1
-rw-r--r--lib/chef/formatters/minimal.rb1
4 files changed, 17 insertions, 0 deletions
diff --git a/lib/chef/application/knife.rb b/lib/chef/application/knife.rb
index 3d6563f43a..e8acb8ebcd 100644
--- a/lib/chef/application/knife.rb
+++ b/lib/chef/application/knife.rb
@@ -216,6 +216,15 @@ class Chef::Application::Knife < Chef::Application
rescue OptionParser::InvalidOption => e
puts "#{e}\n"
end
+
+ if want_help?
+ puts "#{Chef::Dist::PRODUCT}: #{Chef::VERSION}"
+ puts
+ puts "Docs: #{Chef::Dist::KNIFE_DOCS}"
+ puts "Patents: #{Chef::Dist::PATENTS}"
+ puts
+ end
+
puts opt_parser
puts
Chef::Knife.list_commands
diff --git a/lib/chef/dist.rb b/lib/chef/dist.rb
index 7e6b221864..b706f2d28f 100644
--- a/lib/chef/dist.rb
+++ b/lib/chef/dist.rb
@@ -26,6 +26,12 @@ class Chef
# product website address
WEBSITE = "https://chef.io".freeze
+ # product patents page
+ PATENTS = "https://www.chef.io/patents".freeze
+
+ # knife documentation page
+ KNIFE_DOCS = "https://docs.chef.io/workstation/knife/".freeze
+
# Chef-Zero's product name
ZERO = "Chef Infra Zero".freeze
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index 88f332626c..557f2b3682 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -42,6 +42,7 @@ class Chef
def run_start(version, run_status)
puts_line "Starting #{Chef::Dist::PRODUCT}, version #{version}"
+ puts_line "Patents: #{Chef::Dist::PATENTS}"
puts_line "Targeting node: #{Chef::Config.target_mode.host}" if Chef::Config.target_mode?
puts_line "OpenSSL FIPS 140 mode enabled" if Chef::Config[:fips]
end
diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb
index a35a7e8057..ba616798ab 100644
--- a/lib/chef/formatters/minimal.rb
+++ b/lib/chef/formatters/minimal.rb
@@ -29,6 +29,7 @@ class Chef
# Called at the very start of a Chef Run
def run_start(version, run_status)
puts_line "Starting #{Chef::Dist::PRODUCT}, version #{version}"
+ puts_line "Patents: #{Chef::Dist::PATENTS}"
puts_line "Targeting node: #{Chef::Config.target_mode.host}" if Chef::Config.target_mode?
puts_line "OpenSSL FIPS 140 mode enabled" if Chef::Config[:fips]
end