Module: Puppet::ModuleTool::Tar Private

Defined in:
lib/puppet/module_tool/tar.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: Gnu, Mini

Class Method Summary collapse

Class Method Details

.instanceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
15
16
17
18
19
# File 'lib/puppet/module_tool/tar.rb', line 10

def self.instance
  if Puppet.features.minitar? && Puppet.features.zlib?
    Mini.new
  elsif Puppet::Util.which('tar') && !Puppet::Util::Platform.windows?
    Gnu.new
  else
    # TRANSLATORS "tar" is a program name and should not be translated
    raise RuntimeError, _('No suitable tar implementation found')
  end
end