瀏覽代碼

Modify toolchain/autoupdate_testdata.py to use scripts/scripts_utils.py (#4227)

The current `toolchain/autoupdate_testdata.py` script assumes the
correct bazel version is already installed. This change uses
`scripts/scripts_utils.py` to fallback to `bazelisk`.
R B 1 年之前
父節點
當前提交
6414ca9344
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      toolchain/autoupdate_testdata.py

+ 3 - 2
toolchain/autoupdate_testdata.py

@@ -15,12 +15,13 @@ from pathlib import Path
 
 
 def main() -> None:
+    bazel = str(Path(__file__).parents[1] / "scripts" / "run_bazel.py")
     # Use the most recently used build mode, or `fastbuild` if missing
     # `bazel-bin`.
     build_mode = "fastbuild"
     workspace = subprocess.check_output(
         [
-            "bazel",
+            bazel,
             "info",
             "workspace",
             "--ui_event_filters=stdout",
@@ -37,7 +38,7 @@ def main() -> None:
             exit(f"Build mode not found in `bazel-bin` symlink: {link}")
 
     argv = [
-        "bazel",
+        bazel,
         "run",
         "-c",
         build_mode,