Skip to content

Commit be5ba2a

Browse files
committed
Make sure a2x and gzip are available when needed
1 parent e8e79f9 commit be5ba2a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

lib/App/Cpan6/Commands/Bootstrap/Man.pm6

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ multi sub MAIN(
3434
my $destination = "$dir/man" ~ $page.split(".")[*-1] ~ "/$page.gz";
3535

3636
die "Invalid source $page" unless $source;
37-
die "a2x is not installed" unless which("a2x");
37+
die "'a2x' is not available on this system" unless which("a2x");
38+
die "'gzip' is not available on this system" unless which("gzip");
3839

3940
chdir $source.IO.parent.path;
4041

t/command-bootstrap-man.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ use App::Cpan6::Commands::New;
88
use App::Cpan6::Config;
99
use Test;
1010

11-
plan 2;
11+
if (!which("a2x")) {
12+
note "'a2x' is not available";
13+
done-testing;
14+
}
15+
16+
if (!which("gzip")) {
17+
note "'gzip' is not available";
18+
done-testing;
19+
}
1220

1321
multi sub MAIN { 0 }
1422

23+
plan 2;
24+
1525
my $root = tempdir;
1626

1727
chdir $root;

0 commit comments

Comments
 (0)