From 92ba81496b67a9d3b457625399e19214166e1b70 Mon Sep 17 00:00:00 2001 From: Cody Ohlsen Date: Wed, 17 Apr 2024 13:07:32 -0700 Subject: [PATCH] getdeps: support GETDEPS_WGET_ARGS in wget version Summary: X-link: https://github.com/facebook/proxygen/pull/495 X-link: https://github.com/facebook/mvfst/pull/337 X-link: https://github.com/facebook/fboss/pull/194 X-link: https://github.com/facebookincubator/zstrong/pull/748 I found it useful to be able to set `GETDEPS_WGET_ARGS` to change some of the flags to `wget` while it's in that fetch mode :) Differential Revision: D56263907 --- build/fbcode_builder/getdeps/fetcher.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/fbcode_builder/getdeps/fetcher.py b/build/fbcode_builder/getdeps/fetcher.py index b1c113f467..f02dd447bf 100644 --- a/build/fbcode_builder/getdeps/fetcher.py +++ b/build/fbcode_builder/getdeps/fetcher.py @@ -683,15 +683,18 @@ def progress_pycurl(self, total, amount, _uploadtotal, _uploadamount): start = time.time() try: if os.environ.get("GETDEPS_USE_WGET") is not None: - subprocess.run( + procargs = ( [ "wget", + ] + + os.environ.get("GETDEPS_WGET_ARGS", "").split() + + [ "-O", file_name, url, ] ) - + subprocess.run(procargs, capture_output=True) headers = None elif os.environ.get("GETDEPS_USE_LIBCURL") is not None: