summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram Karve <vikram.karve@progress.com>2021-07-17 16:35:07 +0530
committerVikram Karve <vikram.karve@progress.com>2021-07-17 16:35:07 +0530
commit0b30afdb6bfadff94c3e24547eeac78d1184d326 (patch)
treeb01be1e0c415b84a1ec9c9fcf63ffe8d704dc694
parent6d44ea1df5914f067c346c2a9de8512407988a6a (diff)
downloadchef-0b30afdb6bfadff94c3e24547eeac78d1184d326.tar.gz
Updated error message displayed when cookbook unshare fails. Addresses https://github.com/chef/chef/issues/8056
Signed-off-by: Vikram Karve <vikram.karve@progress.com>
-rw-r--r--knife/lib/chef/knife/supermarket_unshare.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/knife/lib/chef/knife/supermarket_unshare.rb b/knife/lib/chef/knife/supermarket_unshare.rb
index 8c86769804..669c217e09 100644
--- a/knife/lib/chef/knife/supermarket_unshare.rb
+++ b/knife/lib/chef/knife/supermarket_unshare.rb
@@ -50,7 +50,8 @@ class Chef
rescue Net::HTTPClientException => e
raise e unless /Forbidden/.match?(e.message)
- ui.error "Forbidden: You must be the maintainer of #{@cookbook_name} to unshare it."
+ ui.error "Forbidden: You must be the maintainer of #{@cookbook_name} to unshare it & #{config[:supermarket_site]} must allow maintainers to unshare cookbooks."
+ ui.warn "The default supermarket #{default_config[:supermarket_site]} does not allow maintainers to unshare cookbooks."
exit 1
end