Exception: Puppet::ModuleTool::Errors::MultipleInstalledError
- Inherits:
-
ModuleToolError
- Object
- StandardError
- ModuleToolError
- Puppet::ModuleTool::Errors::MultipleInstalledError
- Defined in:
- lib/vendor/puppet/module_tool/errors/shared.rb
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.
79 80 81 82 83 84 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 79 def initialize() @module_name = [:module_name] @modules = [:installed_modules] @action = [:action] super "Could not #{@action} '#{@module_name}'; module appears in multiple places in the module path" end |
Instance Method Details
#multiline ⇒ Object
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 86 def multiline = [] << "Could not #{@action} module '#{@module_name}'" << " Module '#{@module_name}' appears multiple places in the module path" += @modules.map do |mod| " '#{@module_name}' (#{v(mod.version)}) was found in #{mod.modulepath}" end << " Use the `--modulepath` option to limit the search to specific directories" .join("\n") end |