Exception: Puppet::ModuleTool::Errors::InstallConflictError Private
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::InstallConflictError
- Defined in:
- lib/puppet/module_tool/errors/shared.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(options) ⇒ InstallConflictError
constructor
private
A new instance of InstallConflictError.
- #multiline ⇒ Object private
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ InstallConflictError
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 InstallConflictError.
69 70 71 72 73 74 75 76 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 69 def initialize() @requested_module = [:requested_module] @requested_version = v([:requested_version]) @dependency = [:dependency] @directory = [:directory] @metadata = [:metadata] super _("'%{module_name}' (%{version}) requested; installation conflict") % { module_name: @requested_module, version: @requested_version } 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.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 78 def multiline = [] << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version } if @dependency << _(" Dependency '%{name}' (%{version}) would overwrite %{directory}") % { name: @dependency[:name], version: v(@dependency[:version]), directory: @directory } else << _(" Installation would overwrite %{directory}") % { directory: @directory } end if @metadata << _(" Currently, '%{current_name}' (%{current_version}) is installed to that directory") % { current_name: @metadata["name"], current_version: v(@metadata["version"]) } end if @dependency # TRANSLATORS `puppet module install --ignore-dependencies` is a command line and should not be translated << _(" Use `puppet module install --ignore-dependencies` to install only this module") else # TRANSLATORS `puppet module install --force` is a command line and should not be translated << _(" Use `puppet module install --force` to install this module anyway") end .join("\n") end |