Exception: Puppet::ModuleTool::Errors::NoVersionsSatisfyError

Inherits:
ModuleToolError show all
Defined in:
lib/puppet/module_tool/errors/shared.rb

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ NoVersionsSatisfyError

Returns a new instance of NoVersionsSatisfyError.



4
5
6
7
8
9
10
11
12
# File 'lib/puppet/module_tool/errors/shared.rb', line 4

def initialize(options)
  @requested_name    = options[:requested_name]
  @requested_version = options[:requested_version]
  @installed_version = options[:installed_version]
  @conditions        = options[:conditions]
  @action            = options[:action]

  super "Could not #{@action} '#{@requested_name}' (#{vstring}); no version satisfies all dependencies"
end

Instance Method Details

#multilineObject



14
15
16
17
18
19
20
21
# File 'lib/puppet/module_tool/errors/shared.rb', line 14

def multiline
  message = []
  message << "Could not #{@action} module '#{@requested_name}' (#{vstring})"
  message << "  No version of '#{@requested_name}' can satisfy all dependencies"
  message << "    Use `puppet module #{@action} --ignore-dependencies` to #{@action} only this module"

  message.join("\n")
end