Exception: Puppet::ModuleTool::Errors::InstallPathExistsNotDirectoryError Private
- Inherits:
-
InstallError
- Object
- RuntimeError
- Error
- ModuleToolError
- InstallError
- Puppet::ModuleTool::Errors::InstallPathExistsNotDirectoryError
- Defined in:
- lib/puppet/module_tool/errors/installer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(original, options) ⇒ InstallPathExistsNotDirectoryError
constructor
private
A new instance of InstallPathExistsNotDirectoryError.
- #multiline ⇒ Object private
Methods inherited from ModuleToolError
Constructor Details
#initialize(original, options) ⇒ InstallPathExistsNotDirectoryError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InstallPathExistsNotDirectoryError.
46 47 48 49 50 51 |
# File 'lib/puppet/module_tool/errors/installer.rb', line 46 def initialize(original, ) @requested_module = [:requested_module] @requested_version = [:requested_version] @directory = [: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
#multiline ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 56 57 58 59 60 |
# File 'lib/puppet/module_tool/errors/installer.rb', line 53 def multiline = [] << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version } << _(" Path '%{directory}' exists but is not a directory.") % { directory: @directory } # TRANSLATORS "mkdir -p '%{directory}'" is a command line example and should not be translated << _(" A potential solution is to rename the path and then \"mkdir -p '%{directory}'\"") % { directory: @directory } .join("\n") end |