diff --git a/tests/testlib/script_helpers/dockerized_execution.py b/tests/testlib/script_helpers/dockerized_execution.py index 355c3cdee9c..84ba13b4aae 100644 --- a/tests/testlib/script_helpers/dockerized_execution.py +++ b/tests/testlib/script_helpers/dockerized_execution.py @@ -731,6 +731,9 @@ def _prepare_git_overlay( ], ) + # remove any broken links in the repository (e.g. invalid bazel cache references) + _exec_run(container, ["find", target_path, "-maxdepth", "1", "-xtype", "l", "-delete"]) + # target_path belongs to root, but its content belong to testuser. Newer git versions don't like # that by default, so we explicitly say that this is ok. _exec_run(