wp-cli / dist-archive-command

Create a distribution .zip or .tar.gz based on a plugin or theme's .distignore file
https://developer.wordpress.org/cli/commands/dist-archive/
MIT License
47 stars 23 forks source link

Prompt if archive file already exists, instead of overwriting automatically #70

Closed BrianHenryIE closed 8 months ago

BrianHenryIE commented 1 year ago

Feature Request

Describe your use case and the problem you are facing

I regularly forget to change the plugin version number before running this command, which then overwrites the previous archive.

Describe the solution you'd like

An option to halt if the file already exists, ~ --no-overwrite (is there any convention for such an argument?), which would perform a file_exists() and print a helpful message as it exits.

danielbachhuber commented 1 year ago

@BrianHenryIE This makes sense for me. We could prompt for confirmation if the file already exists. Given we haven't tagged 3.0.0 yet, we can make it a breaking change.

sejas commented 10 months ago

I would like to work on this, although not sure if I'll be able to finish it today.

danielbachhuber commented 8 months ago

🚢