From 188e0c6178bc2e71e21e94c0370eadd1d638162f Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Thu, 22 Dec 2022 18:40:37 +0800 Subject: [PATCH] bcr_presubmit: Prevent patch command line tool from asking questions Context: https://github.com/bazelbuild/bazel-central-registry/pull/327#issuecomment-1362655342 --- buildkite/bazel-central-registry/bcr_presubmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildkite/bazel-central-registry/bcr_presubmit.py b/buildkite/bazel-central-registry/bcr_presubmit.py index 1aef5343ec..ca6e2ee640 100755 --- a/buildkite/bazel-central-registry/bcr_presubmit.py +++ b/buildkite/bazel-central-registry/bcr_presubmit.py @@ -195,7 +195,7 @@ def load_source_json(module_name, module_version): def apply_patch(work_dir, patch_strip, patch_file): # Requires `patch` to be installed, this is true for all Bazel CI VMs, including Windows VMs. subprocess.run( - ["patch", "-p%d" % patch_strip, "-i", patch_file], shell=False, check=True, env=os.environ, cwd=work_dir + ["patch", "-f", "-p%d" % patch_strip, "-i", patch_file], shell=False, check=True, env=os.environ, cwd=work_dir )