mk-ca-bundle.pl: delay 'curl -V' execution until it is needed
Avoid an `Can't exec "curl"` message when curl is not actually needed. Closes #14060
This commit is contained in:
parent
5c873da92a
commit
4fab113d4e
@ -136,8 +136,6 @@ else {
|
|||||||
$url = $opt_d;
|
$url = $opt_d;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $curl = `curl -V`;
|
|
||||||
|
|
||||||
if ($opt_i) {
|
if ($opt_i) {
|
||||||
print ("=" x 78 . "\n");
|
print ("=" x 78 . "\n");
|
||||||
print "Script Version : $version\n";
|
print "Script Version : $version\n";
|
||||||
@ -314,6 +312,7 @@ if(!$opt_n) {
|
|||||||
|
|
||||||
# If we have an HTTPS URL then use curl
|
# If we have an HTTPS URL then use curl
|
||||||
if($url =~ /^https:\/\//i) {
|
if($url =~ /^https:\/\//i) {
|
||||||
|
my $curl = `curl -V`;
|
||||||
if($curl) {
|
if($curl) {
|
||||||
if($curl =~ /^Protocols:.* https( |$)/m) {
|
if($curl =~ /^Protocols:.* https( |$)/m) {
|
||||||
report "Get certdata with curl!";
|
report "Get certdata with curl!";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user