Add one more potential path for templates#10
Conversation
|
@schlessera To test: I'd have to say this type of bug is quite annoying though. Definitely open to ideas on how we can improve. |
|
I don't think that's a good approach to fix this bug. The bug happens because you use the framework rootfolder to locate a command subfolder. As the command has been split out, it can move around independently of the framework. So, I would recommend to locate the command subfolder based on the command rootfolder (or a known subfolder of the command), instead of the independent framework rootfolder. Something like: |
It's still dependent on
This doesn't work inside the Phar. |
|
Related wp-cli/wp-cli#3987 |
|
I ran some tests, and I found a way to get the command path from within a phar. The basic code is this: This basically uses the What do you think? Is this something we can use? |
Instead of relating the `/templates/` path to the (relatively) shifting WP-CLI framework, relate it to the command's root folder instead. See #10
|
Closing in favor of #12 |
Instead of relating the `/templates/` path to the (relatively) shifting WP-CLI framework, relate it to the command's root folder instead. See #10
Fixes wp-cli/extension-command#9