mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
fetchpatch: escape excludes and includes
Excludes and includes are implemented by passing the parameters to the respective flags of `filterdiff`. Those were passed unescaped until now. Since those flags expect patterns (similar to shell globs), something like `/some/path/*` might be used to exclude or include all files in some path. Without escaping the shell would expand the `*`, leading to unexpected behaviour.
This commit is contained in:
parent
aa6adfc324
commit
1ddab0efb1
@ -23,8 +23,8 @@ fetchurl ({
|
||||
--clean "$out" > "$tmpfile"
|
||||
${patchutils}/bin/filterdiff \
|
||||
-p1 \
|
||||
${builtins.toString (builtins.map (x: "-x ${x}") excludes)} \
|
||||
${builtins.toString (builtins.map (x: "-i ${x}") includes)} \
|
||||
${builtins.toString (builtins.map (x: "-x ${lib.escapeShellArg x}") excludes)} \
|
||||
${builtins.toString (builtins.map (x: "-i ${lib.escapeShellArg x}") includes)} \
|
||||
"$tmpfile" > "$out"
|
||||
${args.postFetch or ""}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user