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} '%{module_name}' (%{version}); no version satisfies all dependencies") % { action: @action, module_name: @requested_name, version: vstring }
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 '%{module_name}' (%{version})") % { action: @action, module_name: @requested_name, version: vstring }
  message << _("  No version of '%{module_name}' can satisfy all dependencies") % { module_name: @requested_name }
  message << _("    Use `puppet module %{action} --ignore-dependencies` to %{action} only this module") % { action: @action }

  message.join("\n")
end