Force using Archive::Tar when unpacking compressed tarballs on solaris
[zeal.git] / 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.01002 seconds and 4 git commands to generate.