Permalink
Browse files

Check the success status of corelist

  • Loading branch information...
1 parent bcc0c39 commit 94e0fd9556cf8e75e59d22bec7b2501285c8de02 Steven Haryanto (on Asus Zenbook) committed Oct 4, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/App/LintPrereqs.pm
View
@@ -124,7 +124,14 @@ sub lint_prereqs {
my %core_mods;
my $clpath = which("corelist")
or return [412, "Can't find corelist in PATH"];
- for (`$clpath -v $perlv`) {
+ my @clout = `corelist -v $perlv`;
+ if ($?) {
+ my $clout = join "", @clout;
+ return [400, "corelist doesn't recognize perl version $perlv"]
+ if $clout =~ /has no info on perl /;
+ return [500, "Can't execute corelist command successfully"];
+ }
+ for (@clout) {
chomp;
/^([\w:]+)(?:\s+(\S+))?\s*$/ or next;
#do {

0 comments on commit 94e0fd9

Please sign in to comment.