pip has the argument --exists-action:
$ pip --help
...
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
It is not possible to use --exists-action with pip-sync, isn't it?
The problem: The pip-sync call should not _hang_ with the input question:
What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup
Yeah, I just ran into this too:
$ pip-sync --version
pip-sync, version 1.11.0
$ pip-sync --exists-action w
Error: no such option: --exists-action
I think that an implementation would look very much like the way #283 solves for #192 by adding a passthrough for --index-url and --extra-index-url.
@vphilippon @davidovich would such a PR be welcome? I'm new to contributing to pip-tools and via jazzband in general. I'm CCing you two based on the pip-tools lead discussion at https://github.com/jazzband/roadies/issues/64, but LMK if there's someone else I should ask. Thanks!
Hi @jasonm, yes PRs are always welcomed!
I had the idea of making a more generic solution, passing all unknown flags to pip so we don't have to redefine them on pip-sync, but it was getting mixed with src_files and it was getting messy, so I've set that aside for now. We can add requested options directly on pip-sync as it's been done before for now.
FYI, pip environment variables can also be used to set options not directly defined on pip-sync.
Ex: PIP_EXISTS_ACTION=w
@jedie FYI, there is tracking issue #321 for additional options to pip-compile and pip-sync.
I'll close this based on the above workaround, but please let us know if it doesn't resolve your issue. Thanks!
Most helpful comment
Hi @jasonm, yes PRs are always welcomed!
I had the idea of making a more generic solution, passing all unknown flags to pip so we don't have to redefine them on pip-sync, but it was getting mixed with
src_filesand it was getting messy, so I've set that aside for now. We can add requested options directly on pip-sync as it's been done before for now.FYI, pip environment variables can also be used to set options not directly defined on pip-sync.
Ex:
PIP_EXISTS_ACTION=w