Skip to content

Commit

Permalink
Fix removing MODULE.bazel file
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy authored Jan 7, 2025
1 parent e8838ad commit 87561a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buildkite/bazel-central-registry/bcr_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import sys
import subprocess
import shutil
import stat
import time
import urllib.request
import zipfile
Expand Down Expand Up @@ -251,6 +252,7 @@ def prepare_test_module_repo(module_name, module_version, overwrite_bazel_versio
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)

Expand Down

0 comments on commit 87561a1

Please sign in to comment.