wp-cli / extension-command

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

Support `--adapt-slug` to override the default directory when installing zips #328

Closed borkweb closed 2 years ago

borkweb commented 2 years ago

The install subcommand for both plugins and themes now support the following:

Fixes: #74

danielbachhuber commented 2 years ago

@borkweb Looks pretty great so far! I kicked off the test suite to see if there are any side effects.

What do you think should happen for wp [plugin|theme] install whatever.zip whatever2.zip --adapt-slug=bork? Should we throw an error?

borkweb commented 2 years ago

@danielbachhuber - Oh! I that's a great question. Erroring makes a lot of sense.

danielbachhuber commented 2 years ago

@borkweb Sounds good. Can you add a test case for that scenario? It looks like there's a coding standards issue that needs to be fixed too.

danielbachhuber commented 2 years ago

Proceeding with https://github.com/wp-cli/wp-cli/issues/5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/6d013dbff6c939165c4c03c34b6477a1 in case this PR is auto-closed or broken in some way.