Module: Puppet::ModuleTool::Tar

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

Defined Under Namespace

Classes: Gnu, Mini

Class Method Summary collapse

Class Method Details

.instanceObject



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

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