From: Graham Knop Date: Sat, 6 Apr 2019 13:30:38 +0000 (+0200) Subject: silence errors if tar and gtar don't exist X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87c14395b8b86c3ede74d1cef96ed1889ab9d901;p=p5sagit%2FDistar.git silence errors if tar and gtar don't exist --- diff --git a/lib/Distar.pm b/lib/Distar.pm index e283189..a3197e8 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -138,14 +138,15 @@ sub write_manifest_skip { my $pre_tar = $self->{TAR}; my $out = $self->SUPER::init_dist(@_); + my $dn = File::Spec->devnull; my $tar = $self->{TAR}; my $gtar; my $set_user; - my $version = `$tar --version`; + my $version = `$tar --version 2>$dn`; if ($version =~ /GNU tar/) { $gtar = 1; } - elsif (!$pre_tar && `gtar --version`) { + elsif (!$pre_tar && `gtar --version 2>$dn`) { $tar = 'gtar'; $gtar = 1; }