Closed borkweb closed 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?
@danielbachhuber - Oh! I that's a great question. Erroring makes a lot of sense.
@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.
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.
The
install
subcommand for both plugins and themes now support the following:wp [plugin|theme] install whatever.zip --adapt-slug=bork
- When installing a zip (whether remote or local), the directory it gets installed to will be the value inadapt-slug
; in this case,bork/
'wp [plugin|theme] install whatever.zip --adapt-slug
- When installing a zip (whether remote or local), the plugin or theme name will be fetched from the bootstrap file or style.css respectively, slug-ify it, and then use that as the directory it gets installed to.Fixes: #74