1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

Only use --force for patches applied in reverse

Using `--forward` already instructs `--patch` to ignore patches that it thinks are reversed or already applied.
This commit is contained in:
Marwan Aljubeh 2023-03-07 13:37:18 +00:00 committed by GitHub
parent 42e0e4f3b4
commit ca62d93c6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ in
${concatMapStringsSep "\n" (f: ''
f="$(basename ${f})"
if ! patch --force --reverse --dry-run -d / -p1 < '${f}' &> /dev/null; then
patch --force --forward --backup -d / -p1 < '${f}' || true
patch --forward --backup -d / -p1 < '${f}' || true
fi
'') cfg.patches}
'';