wp-cli: Invalid plugin slug specified with wp scaffold plugin-tests

On my Windows 10 machine

wp plugin list gives

+------------------------------------+----------+-----------+---------+
| name                               | status   | update    | version |
+------------------------------------+----------+-----------+---------+
| akismet                            | active   | available | 3.1.10  |
| backupwordpress                    | active   | available | 3.6.1   |
| crafty-social-buttons              | active   | available | 1.5.5   |
| hello                              | inactive | none      | 1.6     |
| one-click-child-theme              | active   | none      | 1.6     |

etc…

yet wp scaffold plugin-tests hello gives Error: Invalid plugin slug specified.

Same for all listed plugins.

Previous to updating from v0.25 this was working. I also updated psy/psysh

Any suggestions why/how to make work?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Ok, it seems this is down to check_target_directory() method not normalizing paths:

string(36) "C:/server/www/dev/wp-content/plugins" // WP_PLUGIN_DIR
string(36) "C:\server\www\dev\wp-content\plugins" // $parent_dir

@FarizF You can wp cli update --nightly to update to the nightly build. This issue hasn’t made it into a stable release yet.

I promised to do a proper PR, as a resident WordPress Windows person, will get to it… 😃