Force using Archive::Tar when unpacking compressed tarballs on solaris
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 22:25:01 +0000 (00:25 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 22:25:01 +0000 (00:25 +0200)
lib/Zeal/Feed.pm

index b4bbc521437d6649a1e36e28b8f4ccebc7eb07dd..ba1767f83ca7f79f18b5328004924d05200a22eb 100644 (file)
@@ -62,6 +62,11 @@ sub _unpack_tar_to_dir {
        my $oldwd = getcwd;
        chdir $dir;
        my $tar = which 'tar' or which 'gtar';
+
+       # uncoverable branch true
+       # uncoverable condition false
+       local $ENV{ZEAL_USE_INTERNAL_TAR} = 1 if $file =~ /gz$|bz2$/ && $^O eq 'solaris';
+
        if ($tar && !$ENV{ZEAL_USE_INTERNAL_TAR}) {
                my $arg = '-xf';
                $arg = '-xzf' if $file =~ /[.]t?gz$/;
This page took 0.010051 seconds and 4 git commands to generate.