You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If requirements.in is empty, running pip-compile will create or clobber requirements.txt, thereby removing all requirements, but if --no-header is passed to pip-compile, requirements.txt will not be affected in any way, no matter its state.
Environment Versions
Linux
Python version: 3.7.4
pip version: 19.2.3
pip-tools version: 4.1.0
Steps to replicate
touch requirements.in
pip-compile --no-header
# no txt file created (unexpected)
pip-compile
# txt file created (as expected)echo plumbum > requirements.in
pip-compile
echo> requirements.in
pip-compile --no-header
cat requirements.txt
full, unexpected:
## This file is autogenerated by pip-compile# To update, run:## pip-compile#plumbum==1.6.7
The text was updated successfully, but these errors were encountered:
I'll submit a pull request for this today. Would it be preferable for the writer line iterator to simply always yield a final extra newline, or to actually keep track of whether or not it has yielded any real lines along the way, and only add the newline in that case?
…d --no-header is supplied (Fixesjazzband#900)
Add !is_empty (yielded) tracking to the writer's _iter_lines method, and yield a blank line (empty string) if (and only if) otherwise nothing at all would be yielded.
If
requirements.in
is empty, runningpip-compile
will create or clobberrequirements.txt
, thereby removing all requirements, but if--no-header
is passed topip-compile
,requirements.txt
will not be affected in any way, no matter its state.Environment Versions
3.7.4
19.2.3
4.1.0
Steps to replicate
full, unexpected:
The text was updated successfully, but these errors were encountered: