wp-cli / extension-command

Manages plugins and themes, including installs, activations, and updates.
MIT License
90 stars 79 forks source link

Avoid deleting theme if the specified version cannot be found #349

Closed danielbachhuber closed 1 year ago

danielbachhuber commented 1 year ago

Fixes https://github.com/wp-cli/extension-command/issues/144

The "delete before install" behavior was originally added in https://github.com/wp-cli/wp-cli/pull/1510

Interestingly, it doesn't appear necessary and may have been copy paste from the wp plugin update code.

Seems like it should be fine to remove if all of the existing tests pass. I moved a few other relevant tests into my new feature file.

schlessera commented 1 year ago

The "delete before install" behavior was originally added in https://github.com/wp-cli/wp-cli/pull/1510

It was already added prior to that, with https://github.com/wp-cli/wp-cli/commit/d4fa0c697849bbf46f2f095f968f400e3514cf9c