# class Puppet::ModuleTool::Errors::MultipleInstalledError

### Public Class Methods

new(options) click to toggle source
Calls superclass method Puppet::Error.new

    # File lib/puppet/module_tool/errors/shared.rb, line 79
    def initialize(options)
      @module_name = options[:module_name]
      @modules     = options[:installed_modules]
      @action      = options[:action]
      super "Could not #{@action} '#{@module_name}'; module appears in multiple places in the module path"
    end

### Public Instance Methods

multiline() click to toggle source

    # File lib/puppet/module_tool/errors/shared.rb, line 86
    def multiline
      message = []
      message << "Could not #{@action} module '#{@module_name}'"
      message << "  Module '#{@module_name}' appears multiple places in the module path"
      message += @modules.map do |mod|
        "    '#{@module_name}' (#{v(mod.version)}) was found in #{mod.modulepath}"
      end
      message << "    Use the `--modulepath` option to limit the search to specific directories"
      message.join("\n")
    end