From 900f41cc3a62ad79b0f13aa61d63b3b8a01fc9f5 Mon Sep 17 00:00:00 2001 From: Jon Meow <46229924+jonmeow@users.noreply.github.com> Date: Thu, 24 Feb 2022 09:51:04 -0800 Subject: [PATCH] fsync cache file (#1094) --- scripts/scripts_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/scripts_utils.py b/scripts/scripts_utils.py index 2ac6b24cb759..cc75ef6620d7 100644 --- a/scripts/scripts_utils.py +++ b/scripts/scripts_utils.py @@ -81,6 +81,8 @@ def _download(url: str, local_path: Path) -> Optional[int]: return int(response.code) with local_path.open("wb") as f: shutil.copyfileobj(response, f) + # Run fsync because of "Text file busy" in GH Actions. + os.fsync(f.fileno()) return None