Exception: Puppet::ModuleTool::Errors::MissingPackageError

Inherits:
InstallError show all
Defined in:
lib/puppet/module_tool/errors/installer.rb

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ MissingPackageError


28
29
30
31
32
33
# File 'lib/puppet/module_tool/errors/installer.rb', line 28

def initialize(options)
  @requested_package = options[:requested_package]
  @source = options[:source]

  super _("Could not install '%{requested_package}'; no releases are available from %{source}") % { requested_package: @requested_package, source: @source }
end

Instance Method Details

#multilineObject


35
36
37
38
39
40
41
# File 'lib/puppet/module_tool/errors/installer.rb', line 35

def multiline
  message = []
  message << _("Could not install '%{requested_package}'") % { requested_package: @requested_package }
  message << _("  No releases are available from %{source}") % { source: @source }
  message << _("    Does '%{requested_package}' have at least one published release?") % { requested_package: @requested_package }
  message.join("\n")
end