From 58d5c4e8ba218b44d474f949f9390e2e7de50ac8 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Fri, 5 May 2023 20:16:34 -0500 Subject: [PATCH] use a more portable no backup argument to patch Use the --posix argument to prevent patch from making backup files rather than the --no-backup-if-mismatch argument which is specific to GNU patch and not supported by various *BSD implementations. --- conda_build/source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_build/source.py b/conda_build/source.py index dc90054744..9c3e7c3e41 100644 --- a/conda_build/source.py +++ b/conda_build/source.py @@ -926,7 +926,7 @@ def try_apply_patch(patch, patch_args, cwd, stdout, stderr): temp_name = os.path.join( tempfile.gettempdir(), next(tempfile._get_candidate_names()) ) - base_patch_args = ["--no-backup-if-mismatch", "--batch"] + patch_args + base_patch_args = ["--posix", "--batch"] + patch_args try: try_patch_args = base_patch_args[:] try_patch_args.append("--dry-run")