summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/metadata.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-02-26 17:01:22 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-02-28 11:19:49 -0800
commit7162c001c13d08ac4450dd829da4d501865a9512 (patch)
tree57dde79ec4ba839ac343569ee2409ed2b3e933ef /lib/chef/cookbook/metadata.rb
parent292d177a20135d25596c31fdc005ab4a999d4501 (diff)
downloadchef-7162c001c13d08ac4450dd829da4d501865a9512.tar.gz
raise on cookbook self-dependency
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/cookbook/metadata.rb')
-rw-r--r--lib/chef/cookbook/metadata.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index 3f23bc2056..a8ec901e97 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -2,7 +2,7 @@
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: AJ Christensen (<aj@chef.io>)
# Author:: Seth Falcon (<seth@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -306,7 +306,7 @@ class Chef
# versions<Array>:: Returns the list of versions for the platform
def depends(cookbook, *version_args)
if cookbook == name
- Chef::Log.warn "Ignoring self-dependency in cookbook #{name}, please remove it (in the future this will be fatal)."
+ raise "Cookbook depends on itself in cookbook #{name}, please remove the this unnecessary self-dependency"
else
version = new_args_format(:depends, cookbook, version_args)
constraint = validate_version_constraint(:depends, cookbook, version)