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
46 def initialize(original, options)
47   @requested_module  = options[:requested_module]
48   @requested_version = options[:requested_version]
49   @directory         = options[:directory]
50   super(_("'%{module_name}' (%{version}) requested; Path %{dir} is not a directory.") % { module_name: @requested_module, version: @requested_version, dir: @directory }, original)
51 end

Public Instance Methods

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