From 33b2ae7adef917ddcafb93f3bca6a28d0f750c03 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 14 Mar 2014 13:11:00 -0700 Subject: Change missing dependency from hard error to warning for now. --- lib/chef/exceptions.rb | 2 +- lib/chef/run_context.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/chef') diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index 8df49b9303..bd99cb3ebd 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -76,7 +76,7 @@ class Chef class CookbookNotFoundInRepo < ArgumentError; end class RecipeNotFound < ArgumentError; end class AttributeNotFound < RuntimeError; end - class MissingCookbookDependency < StandardError; end + class MissingCookbookDependency < StandardError; end # CHEF-5120 class InvalidCommandOption < RuntimeError; end class CommandTimeout < RuntimeError; end class RequestedUIDUnavailable < RuntimeError; end diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index b66e3e54c7..a102ef4692 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -145,7 +145,8 @@ class Chef cookbook_name, recipe_short_name = Chef::Recipe.parse_recipe_name(recipe_name) if unreachable_cookbook?(cookbook_name) # CHEF-4367 - raise(Exceptions::MissingCookbookDependency,<<-ERROR_MESSAGE) + Chef::Log.warn(<<-ERROR_MESSAGE) +MissingCookbookDependency: Recipe `#{recipe_name}` is not in the run_list, and cookbook '#{cookbook_name}' is not a dependency of any cookbook in the run_list. To load this recipe, first add a dependency on cookbook '#{cookbook_name}' in the cookbook you're -- cgit v1.2.1