diff --git a/.github/workflows/rust-shed_linux.yml b/.github/workflows/rust-shed_linux.yml index 2e489e9ce..90efc8fa6 100644 --- a/.github/workflows/rust-shed_linux.yml +++ b/.github/workflows/rust-shed_linux.yml @@ -19,9 +19,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Update system package info - run: sudo apt-get update + run: sudo --preserve-env=http_proxy apt-get update - name: Install system deps - run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive rust-shed && sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf + run: sudo --preserve-env=http_proxy python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive rust-shed && sudo --preserve-env=http_proxy python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf - id: paths name: Query paths run: python3 build/fbcode_builder/getdeps.py --allow-system-packages query-paths --recursive --src-dir=. rust-shed >> "$GITHUB_OUTPUT" diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 5efd2efc6..968d3a41c 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -440,7 +440,13 @@ def run_project_cmd(self, args, loader, manifest): elif manager == "deb": packages = sorted(set(all_packages["deb"])) if packages: - cmd_args = ["sudo", "apt", "install", "-y"] + packages + cmd_args = [ + "sudo", + "--preserve-env=http_proxy", + "apt-get", + "install", + "-y", + ] + packages elif manager == "homebrew": packages = sorted(set(all_packages["homebrew"])) if packages: @@ -1155,7 +1161,7 @@ def write_job_for_platform(self, platform, args): # noqa: C901 build_opts.allow_system_packages and build_opts.host_type.get_package_manager() ): - sudo_arg = "sudo " + sudo_arg = "sudo --preserve-env=http_proxy " allow_sys_arg = " --allow-system-packages" if build_opts.host_type.get_package_manager() == "deb": out.write(" - name: Update system package info\n")