Exception: Chef::Exceptions::CookbookChefVersionMismatch
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Chef::Exceptions::CookbookChefVersionMismatch
- Defined in:
- lib/chef/exceptions.rb
Instance Method Summary collapse
-
#initialize(chef_version, cookbook_name, cookbook_version, *constraints) ⇒ CookbookChefVersionMismatch
constructor
A new instance of CookbookChefVersionMismatch.
Constructor Details
#initialize(chef_version, cookbook_name, cookbook_version, *constraints) ⇒ CookbookChefVersionMismatch
Returns a new instance of CookbookChefVersionMismatch.
515 516 517 518 |
# File 'lib/chef/exceptions.rb', line 515 def initialize(chef_version, cookbook_name, cookbook_version, *constraints) constraint_str = constraints.map { |c| c.requirement.as_list.to_s }.join(", ") super "Cookbook '#{cookbook_name}' version '#{cookbook_version}' depends on #{ChefUtils::Dist::Infra::PRODUCT} version #{constraint_str}, but the running #{ChefUtils::Dist::Infra::PRODUCT} version is #{chef_version}" end |