diff options
author | Russ Allbery <rra@cpan.org> | 2019-07-15 17:33:09 -0700 |
---|---|---|
committer | Russ Allbery <rra@cpan.org> | 2019-07-15 17:33:09 -0700 |
commit | a8e593a4413b472d15f61457d3568f57ee04a1b9 (patch) | |
tree | 2cbf72cbbbb6a6f7fe17e9535ffdcd5b750978b7 /t | |
parent | 3b9d125d0e67c02be8c9c73bdcd3ac6df5588b5a (diff) |
Properly skip a test on Windows that requires tar
Diffstat (limited to 't')
-rwxr-xr-x | t/dist/basic.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/dist/basic.t b/t/dist/basic.t index fb3a943..bec8a2e 100755 --- a/t/dist/basic.t +++ b/t/dist/basic.t @@ -54,7 +54,9 @@ systemx(qw(git commit -q -m Initial)); # Check whether we have all the necessary tools to run the test. my $out; -if (!run(['git', 'archive', 'HEAD'], q{|}, ['tar', 'tf', q{-}], \$out)) { +my $result + = eval { run(['git', 'archive', 'HEAD'], q{|}, ['tar', 'tf', q{-}], \$out) }; +if ($@ || !$result) { chdir($cwd); plan skip_all => 'git and tar not available'; } else { |