You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
briefly check if the downloaded cpanm or perlbrew seems to be a valid perl program,
and die with some reasonable message if not.
Since we download them from github and github has been in maintainence
frequently enough to make this a sensible issue, this commit perform a super
dummy check on the downloaded content to see if they begin with "#!/" and
decided whether they are valid or not.
Of course this is far from accurate, but let's see if it is helpful.
my$message = "\nERROR: The downloaded $program_name program seem to be invalid. Please check if the following URL can be reached correctly\n\n\t$url\n\n...and try again latter.";
1376
+
1377
+
unless (-f$x) {
1378
+
openmy$OUT, ">", $x;
1379
+
print$OUT$body;
1380
+
close($OUT);
1381
+
$message .= "\n\nThe previously downloaded file is saved at $x for manual inspection.\n\n";
1382
+
}
1383
+
1384
+
die$message;
1385
+
}
1386
+
1373
1387
if ($body_filter && ref($body_filter) eq"CODE") {
1374
1388
$body = $body_filter->($body);
1375
1389
}
@@ -1823,7 +1837,7 @@ sub run_command_install_patchperl {
0 commit comments