Open aucampia opened 1 year ago
Thanks for the report!
In general, we aim to maintain CLI compatibility with pip
, and pip
also doesn't support -
as a stdin
shorthand. For example, here's what I get with pip --requirements -
:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: '-'
Have you considered using subshell substitution, e.g. something like this?
pip-audit --requirements <(echo 'poetry')
(where echo poetry
is whatever your source is.)
Looks like this is pip
's upstream tracking for -r -
: https://github.com/pypa/pip/issues/7822
Bug description
When running pip-audit with
--requirement -
does not read the requirements from stdin like--requirement /dev/stdin
does but instead raises an exceptionpip_requirements_parser.InstallationError: Could not open requirements file: <stdin>|n[Errno 2] No such file or directory: '<stdin>'
.Reproduction steps
Expected behavior
I expect this to do the same as:
i.e.
Screenshots and logs
instead this is what happens:
Platform information
pip-audit
version (pip-audit -V
): 2.4.6python -V
orpython3 -V
): 3.10.8pip
version (pip -V
orpip3 -V
): Using pipx, so none.Additional context
I'm trying to use pip-audit with poetry, and to do this I run:
However this will probably not work great on windows, and I would prefer a less platform dependent way of specifying stdin, like
--requirement -
.