inveniosoftware / invenio-cli

CLI module for Invenio
https://invenio-cli.readthedocs.io
MIT License
10 stars 43 forks source link

init: supress cookiecutter's re-download prompt #370

Open slint opened 3 months ago

slint commented 3 months ago

When running invenio-cli init ..., cookiecutter always asks for confirmation for re-downloading the source repository. This is quite annoying and confusing to end-users who don't know/care about the internals of cookiectutter when first setting up their instance.

Forcing to with a flag to redownload every time would be perfectly fine, but the only relevant issue on the cookiecutter repo seems to be https://github.com/cookiecutter/cookiecutter/issues/1428. To proposed solution to use the --no-input flag to skip the re-download prompt wouldn't work for us, since we still want users to fill-in the cookiecutter template questions.

$ invenio-cli init rdm -c master
Initializing RDM application...
Running cookiecutter...
You've downloaded /Users/aioannid/.cookiecutters/cookiecutter-invenio-rdm before. Is it okay to delete and re-download it? [yes]:
...