commit 8431db84585d23668551c6035f1256cf79f78332
parent 998de1d372e9e6d0a276955919be1a2cf723696c
Author: Andrew McCreight <continuation@gmail.com>
Date: Sat, 10 Jan 2026 16:10:00 +0000
Bug 2009537 - Make patch run with --batch and check that the exit code is 0. r=tjr DONTBUILD
If you don't run with --batch, if patch gets confused about what file needs
to be patched it brings up a prompt which is invisible to the person running
mach vendor, so it just silently hangs forever.
However, the default behavior of --batch is to skip any chunks it is confused
about, so you have to check that the exit code is 0. Hopefully that is
sufficient to ensure that it applied everything.
Differential Revision: https://phabricator.services.mozilla.com/D278562
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/python/mozbuild/mozbuild/vendor/vendor_manifest.py b/python/mozbuild/mozbuild/vendor/vendor_manifest.py
@@ -920,10 +920,12 @@ class VendorManifest(MozbuildObject):
"--input",
os.path.abspath(patch),
"--no-backup-if-mismatch",
+ "--batch",
]
self.run_process(
args=script,
log_name=script,
+ ensure_exit_code=0,
)
except Exception as e:
# Check if reject file has content (patch failed)