From: Petr Štetiar Date: Tue, 13 Sep 2022 05:38:10 +0000 (+0200) Subject: scripts/download.pl: silence can't exec curl warning X-Git-Tag: v22.03.1~67 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b8cbca8ac8e89aa417a2ab739b81d288185a4b2d;p=openwrt%2Fopenwrt.git 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 (cherry picked from commit c836ca84e8f641e10a8349a8f9b7432b33d6cec1) --- diff --git a/scripts/download.pl b/scripts/download.pl index ab1801aad5..90a1be4e26 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -74,7 +74,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 /; }