From 6361aaf62b7e858d9cdbe8ecb95550df0388b642 Mon Sep 17 00:00:00 2001 From: Volodymyr Babchuk Date: Thu, 6 Jun 2024 12:35:38 +0300 Subject: [PATCH] fetcher: http: force CURL to follow redirects Add "-L" parameter to curl invocation, so it will follow server redirects to an actual file. Signed-off-by: Volodymyr Babchuk --- moulin/fetchers/http.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moulin/fetchers/http.py b/moulin/fetchers/http.py index 6c0da6f..7e08825 100644 --- a/moulin/fetchers/http.py +++ b/moulin/fetchers/http.py @@ -16,7 +16,9 @@ def get_fetcher(conf: YamlValue, build_dir: str, generator: ninja_syntax.Writer) def gen_build_rules(generator: ninja_syntax.Writer): """Generate build rules using Ninja generator""" - generator.rule("curl_download", command="curl $url -o $out ", description="curl download $url") + generator.rule("curl_download", + command="curl -L $url -o $out ", + description="curl download $url") generator.newline()