Exception: Puppet::ModuleTool::Errors::MultipleInstalledError
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::MultipleInstalledError
- Defined in:
- lib/puppet/module_tool/errors/shared.rb
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ MultipleInstalledError
constructor
A new instance of MultipleInstalledError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ MultipleInstalledError
Returns a new instance of MultipleInstalledError.
136 137 138 139 140 141 142 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 136 def initialize() @module_name = [:module_name] @modules = [:installed_modules] @action = [:action] #TRANSLATORS "module path" refers to a set of directories where modules may be installed super _("Could not %{action} '%{module_name}'; module appears in multiple places in the module path") % { action: @action, module_name: @module_name } end |
Instance Method Details
#multiline ⇒ Object
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 144 def multiline = [] << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @module_name } << _(" Module '%{module_name}' appears multiple places in the module path") % { module_name: @module_name } += @modules.map do |mod| _(" '%{module_name}' (%{version}) was found in %{path}") % { module_name: @module_name, version: v(mod.version), path: mod.modulepath } end << _(" Use the `--modulepath` option to limit the search to specific directories") .join("\n") end |