summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
diff options
context:
space:
mode:
authorJeremy Fleischman <jeremyfleischman@gmail.com>2025-05-23 14:15:40 -0700
committerJeremy Fleischman <jeremyfleischman@gmail.com>2025-05-23 14:32:28 -0700
commit1d32087125a9bb3e700b206ceb6eea28fdf07716 (patch)
treebc4e95519f6795f40f20f699a080b2faee4cad17 /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
parentacf27356b93d9b849451ac70ea9b7cccc7156b2a (diff)
fetchpatch: add support for patches to files with apostrophes
We're feeding a list of files from `lsdiff` to `filterdiff` via `xargs`. That list is newline separated, and looks something like this: ``` $ lsdiff <(curl -s https://github.com/jfly/annoying-filenames/commit/1e86a219f5fc9c4137b409bc9c38036f3922724b.patch) a/README.md b/files/The Answer to the Ultimate Question of Life, The Universe, and Everything.txt ``` However, if the list contains files with apostrophes in it, xargs freaks out: ``` $ echo "there's an apostrophe here" | xargs -I{} python -c "import sys; print(sys.argv)" {} xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option ``` The fix is simple, just explicitly specify a delimiter: ``` $ echo "there's an apostrophe here" | xargs -I{} --delimiter='\n' python -c "import sys; print(sys.argv)" {} ['-c', "there's an apostrophe here"] ``` I added 2 tests here: - `nix-build -A pkgs.tests.fetchpatch.fileWithApostrophe` fails without the code change. - `nix-build -A pkgs.tests.fetchpatch.fileWithSpace` passes both before and after this change, but I wanted to add it to prove that I didn't break anything.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions