Poetry: cache:clear - Add automatic yes option

Created on 11 Mar 2019  路  6Comments  路  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.

Feature Request


I have a script which requires me to clear the poetry cache every time I run it because of wonky dependency resolution.
Currently there does not seem to be any way to pipe "yes" into the cache:clear command and I have to insert the command manually, which is a bit tedious.
It would be nice to add a flag which automatically passes the option without requiring user input. I have not found anything in the documentation or issues regarding this topic.

Most helpful comment

Currently there is a -n (--no-interaction) global option, when passed, questions that require user interaction will use its default answer, which is False according to this line L142.
May be we should add another global option to set the default value for --no-iteraction ?

All 6 comments

Currently there is a -n (--no-interaction) global option, when passed, questions that require user interaction will use its default answer, which is False according to this line L142.
May be we should add another global option to set the default value for --no-iteraction ?

Ah this is already quite useful! Yes, it would be nice to allow --no-interaction to specify the default value.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I think this is still something that may be useful, but I do not have the time to submit a pull request.

yes | poetry cache clear --all pypi works for me on 1.0.0b8 (though it does leave behind an empty pypoetry/cache/repositories/pypi folder)

Just tried and it works, thanks for the update!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

jbarlow83 picture jbarlow83  路  3Comments

ulope picture ulope  路  3Comments

nikaro picture nikaro  路  3Comments

Euphorbium picture Euphorbium  路  3Comments