Skip to content

Commit

Permalink
Fix copying MODULE.bazel with no write permission
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy authored Jan 5, 2024
1 parent d646a2d commit c515851
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildkite/bazel-central-registry/bcr_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ def prepare_test_module_repo(module_name, module_version):
# Make sure the checked-in MODULE.bazel file is used.
checked_in_module_dot_bazel = get_module_dot_bazel(module_name, module_version)
bazelci.eprint("\n* Copy checked-in MODULE.bazel file to source root:\n%s\n" % read(checked_in_module_dot_bazel))
module_dot_bazel = source_root.joinpath("MODULE.bazel")
# In case the existing MODULE.bazel has no write permission.
if module_dot_bazel.exists():
os.remove(module_dot_bazel)
shutil.copy(checked_in_module_dot_bazel, source_root.joinpath("MODULE.bazel"))

# Generate the presubmit.yml file for the test module, it should be the content under "bcr_test_module"
Expand Down

0 comments on commit c515851

Please sign in to comment.