Exception: Puppet::ModuleTool::Errors::InvalidDependencyCycleError
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::InvalidDependencyCycleError
- Defined in:
- lib/puppet/module_tool/errors/shared.rb
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ InvalidDependencyCycleError
constructor
A new instance of InvalidDependencyCycleError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ InvalidDependencyCycleError
Returns a new instance of InvalidDependencyCycleError.
89 90 91 92 93 94 95 96 97 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 89 def initialize() @module_name = [:module_name] @requested_module = [:requested_module] @requested_version = [:requested_version] @conditions = [:conditions] @source = [:source][1..-1] super _("'%{module_name}' (%{version}) requested; Invalid dependency cycle") % { module_name: @requested_module, version: v(@requested_version) } end |
Instance Method Details
#multiline ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 99 def multiline trace = [] trace << _("You specified '%{name}' (%{version})") % { name: @source.first[:name], version: v(@requested_version) } #TRANSLATORS Second half of "You specified a module..." trace += @source[1..-1].map { |m| _("which depends on '%{name}' (%{version})") % { name: m[:name], version: v(m[:version]) } } = [] << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: v(@requested_version) } << _(" No version of '%{module_name}' will satisfy dependencies") % { module_name: @module_name } << trace.map { |s| " #{s}".join(",\n") } << _(" Use `puppet module install --force` to install this module anyway") .join("\n") end |