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
48 stars 24 forks source link

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

Closed BrianHenryIE closed 11 months ago

BrianHenryIE commented 2 years 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 2 years 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 1 year ago

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

danielbachhuber commented 11 months ago

🚢