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.
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!
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 isFalseaccording to this line L142.May be we should add another global option to set the default value for
--no-iteraction?