diff mbox series

[1/2] scripts/download.pl: silence can't exec curl warning

Message ID 20220913062213.9059-1-ynezz@true.cz
State Accepted
Headers show
Series [1/2] scripts/download.pl: silence can't exec curl warning | expand

Commit Message

Petr Štetiar Sept. 13, 2022, 6:22 a.m. UTC
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>
---
 scripts/download.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/download.pl b/scripts/download.pl
index ab1801aad5ae..90a1be4e2614 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 /;
 		}