# class Puppet::ModuleTool::InstallDirectory

Control the install location for modules.

### Constants

ERROR_MAPPINGS

### Public Class Methods

new(target_directory) click to toggle source

    # File lib/puppet/module_tool/install_directory.rb, line 7
    def initialize(target_directory)
      @target_directory = target_directory
    end

### Public Instance Methods

prepare(module_name, version) click to toggle source

prepare the module install location. This will create the location if needed.

    # File lib/puppet/module_tool/install_directory.rb, line 13
    def prepare(module_name, version)
      return if @target_directory.directory?

      begin
        @target_directory.mkpath
        Puppet.notice "Created target directory #{@target_directory}"
      rescue SystemCallError => orig_error
        raise converted_to_friendly_error(module_name, version, orig_error)
      end
    end