浏览代码

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 <[email protected]>
Petr Štetiar 3 年之前
父节点
当前提交
c836ca84e8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/download.pl

+ 1 - 1
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 /;
 		}