class Puppet::ModuleTool::Errors::InstallPathExistsNotDirectoryError

Public Class Methods

new(original, options) click to toggle source
Calls superclass method Puppet::Error::new
   # File lib/puppet/module_tool/errors/installer.rb
45 def initialize(original, options)
46   @requested_module  = options[:requested_module]
47   @requested_version = options[:requested_version]
48   @directory         = options[:directory]
49   super(_("'%{module_name}' (%{version}) requested; Path %{dir} is not a directory.") % { module_name: @requested_module, version: @requested_version, dir: @directory }, original)
50 end

Public Instance Methods

multiline() click to toggle source
   # File lib/puppet/module_tool/errors/installer.rb
52 def multiline
53   message = []
54   message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version }
55   message << _("  Path '%{directory}' exists but is not a directory.") % { directory: @directory }
56   #TRANSLATORS "mkdir -p '%{directory}'" is a command line example and should not be translated
57   message << _("  A potential solution is to rename the path and then \"mkdir -p '%{directory}'\"") % { directory: @directory }
58   message.join("\n")
59 end