scripts/download.pl: silence can't exec curl warning

When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:

 Can't exec "curl": No such file or directory at scripts/download.pl line 77.

So lets fix it by redirecting of the stderr to null hole.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit c836ca84e8)
This commit is contained in:
Petr Štetiar 2022-09-13 07:38:10 +02:00
parent f0bca34f16
commit f14d7cef7c
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ sub download_cmd($) {
my $url = shift;
my $have_curl = 0;
if (open CURL, '-|', 'curl', '--version') {
if (open CURL, "curl --version 2>/dev/null |") {
if (defined(my $line = readline CURL)) {
$have_curl = 1 if $line =~ /^curl /;
}