Exception: Puppet::ModuleTool::Errors::InvalidDependencyCycleError
- Inherits:
-
ModuleToolError
- Object
- StandardError
- ModuleToolError
- Puppet::ModuleTool::Errors::InvalidDependencyCycleError
- Defined in:
- lib/vendor/puppet/module_tool/errors/shared.rb
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.
33 34 35 36 37 38 39 40 41 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 33 def initialize() @module_name = [:module_name] @requested_module = [:requested_module] @requested_version = [:requested_version] @conditions = [:conditions] @source = [:source][1..-1] super "'#{@requested_module}' (#{v(@requested_version)}) requested; Invalid dependency cycle" end |
Instance Method Details
#multiline ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 43 def multiline trace = [] trace << "You specified '#{@source.first[:name]}' (#{v(@requested_version)})" trace += @source[1..-1].map { |m| "which depends on '#{m[:name]}' (#{v(m[:version])})" } = [] << "Could not install module '#{@requested_module}' (#{v(@requested_version)})" << " No version of '#{@module_name}' will satisfy dependencies" << trace.map { |s| " #{s}" }.join(",\n") << " Use `puppet module install --force` to install this module anyway" .join("\n") end |