class Puppet::ModuleTool::InstallDirectory

Control the install location for modules.

Constants

ERROR_MAPPINGS

Attributes

target[R]

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 17
def prepare(module_name, version)
  return if @target.directory?

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

Public Class Methods

new(target) click to toggle source
# File lib/puppet/module_tool/install_directory.rb, line 11
def initialize(target)
  @target = target
end