commit | 464ae610e29af1a340fe46a0592788a2b37b74f4 | [log] [tgz] |
---|---|---|
author | Yun Peng <pcloudy@google.com> | Tue Jan 07 17:41:53 2025 +0100 |
committer | GitHub <noreply@github.com> | Tue Jan 07 17:41:53 2025 +0100 |
tree | 1cacc1788de5c600050983f5e52d3df2d75f4586 | |
parent | e8838ad8a348544593d7262a29c123554ff9ab5c [diff] |
Fix removing MODULE.bazel file (#2154) Addressing https://github.com/bazelbuild/bazel-central-registry/pull/3538#issuecomment-2575643477
diff --git a/buildkite/bazel-central-registry/bcr_presubmit.py b/buildkite/bazel-central-registry/bcr_presubmit.py index 6119f80..21040d6 100755 --- a/buildkite/bazel-central-registry/bcr_presubmit.py +++ b/buildkite/bazel-central-registry/bcr_presubmit.py
@@ -28,6 +28,7 @@ import sys import subprocess import shutil +import stat import time import urllib.request import zipfile @@ -251,6 +252,7 @@ module_dot_bazel = source_root.joinpath("MODULE.bazel") # In case the existing MODULE.bazel has no write permission. if module_dot_bazel.exists(): + os.chmod(module_dot_bazel, stat.S_IWRITE) os.remove(module_dot_bazel) shutil.copy(checked_in_module_dot_bazel, module_dot_bazel)