--no--recursive option strips out "-r" line when output file is specified
Closed this issue · 3 comments
michaelusner commented
When I provide the --no-recursive
option to avoid pulling in all of the additional requirements, the -r <file>
line is stripped out of the final file (when using the -o
option).
Example:
r1.txt
-r r2.txt
aiohttp==3.9.4
r2.txt
pytest==8.2.0
Run pur
with --no-recursive
and --dry-run
$ pur --no-recursive --dry-run -r r1.txt
==> r1.txt <==
-r r2.txt
aiohttp==3.9.5
Note that the -r r2.txt
is preserved.
Remove the --dry-run
option. Note -r r2.txt
is preserved:
$ pur --no-recursive -r r1.txt
Updated aiohttp: 3.9.4 -> 3.9.5
All requirements up-to-date.
$ cat r1.txt
-r r2.txt
aiohttp==3.9.5
Specify output file and note that -r r2.txt
is removed:
$ pur --no-recursive -r r1.txt -o tmp
Updated aiohttp: 3.9.4 -> 3.9.5
All requirements up-to-date.
$ cat tmp
aiohttp==3.9.5
I would expect that the output file would still have the -r r2.txt
preserved as both the dry run and in-place options do the same.
alanhamlett commented
Fixed with a3258bc.
alanhamlett commented
Released in v7.3.2.
michaelusner commented
Released in v7.3.2.
Verified. Thank you for getting to that so quickly!