From 42e0e4f3b4aadcae627f65a395600ea17fd6f9f0 Mon Sep 17 00:00:00 2001 From: Marwan Aljubeh Date: Tue, 7 Mar 2023 13:35:24 +0000 Subject: Add `--force` to all patch invocations --- modules/system/patches.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/system') diff --git a/modules/system/patches.nix b/modules/system/patches.nix index bb384e8..3b9d980 100644 --- a/modules/system/patches.nix +++ b/modules/system/patches.nix @@ -56,14 +56,14 @@ in for f in $(ls /run/current-system/patches 2> /dev/null); do if test ! -e "${config.system.build.patches}/patches/$f"; then - patch --reverse --backup -d / -p1 < "/run/current-system/patches/$f" || true + patch --force --reverse --backup -d / -p1 < "/run/current-system/patches/$f" || true fi done ${concatMapStringsSep "\n" (f: '' f="$(basename ${f})" if ! patch --force --reverse --dry-run -d / -p1 < '${f}' &> /dev/null; then - patch --forward --backup -d / -p1 < '${f}' || true + patch --force --forward --backup -d / -p1 < '${f}' || true fi '') cfg.patches} ''; -- cgit v1.2.3