Exception: Puppet::ModuleTool::Errors::InstallPathExistsNotDirectoryError

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(original, options) ⇒ InstallPathExistsNotDirectoryError


45
46
47
48
49
50
# File 'lib/puppet/module_tool/errors/installer.rb', line 45

def initialize(original, options)
  @requested_module  = options[:requested_module]
  @requested_version = options[:requested_version]
  @directory         = options[:directory]
  super(_("'%{module_name}' (%{version}) requested; Path %{dir} is not a directory.") % { module_name: @requested_module, version: @requested_version, dir: @directory }, original)
end

Instance Method Details

#multilineObject


52
53
54
55
56
57
58
59
# File 'lib/puppet/module_tool/errors/installer.rb', line 52

def multiline
  message = []
  message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version }
  message << _("  Path '%{directory}' exists but is not a directory.") % { directory: @directory }
  #TRANSLATORS "mkdir -p '%{directory}'" is a command line example and should not be translated
  message << _("  A potential solution is to rename the path and then \"mkdir -p '%{directory}'\"") % { directory: @directory }
  message.join("\n")
end