Exception: Puppet::ModuleTool::Errors::PermissionDeniedCreateInstallDirectoryError

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) ⇒ PermissionDeniedCreateInstallDirectoryError


63
64
65
66
67
68
# File 'lib/puppet/module_tool/errors/installer.rb', line 63

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

Instance Method Details

#multilineObject


70
71
72
73
74
75
76
# File 'lib/puppet/module_tool/errors/installer.rb', line 70

def multiline
  message = []
  message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version }
  message << _("  Permission is denied when trying to create directory '%{directory}'.")  % { directory: @directory }
  message << _('  A potential solution is to check the ownership and permissions of parent directories.')
  message.join("\n")
end