-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp theme status <theme-name> throws: Error: Couldn't find theme-status.mustache #5907
Comments
@porg The latest stable seems to work fine for me...
Can you share |
This is what I get on my shared webhosting service:
|
My guess is that Lines 1462 to 1473 in e516414
Can you launch |
|
Huh! Can you try re-downloading WP-CLI? What does |
md5 not available in the shell of the webhost. In the European evening I will download the binary via SFTP and then md5 on my computer. |
FYI: The current |
|
|
Yes, as a Phar file ("PHP Archive").
Based on your md5 results, it seems you have the correct file for WP-CLI v2.10.0. But, wp-cli/core-command#160 looks like a similar report where the user saw different results based on which URL they downloaded the Phar from. Can you try downloading a new copy of WP-CLI using |
Generally I believe in computing to be a deterministic discipline
But in our case here, it is rather some PHP env/runtime difference (e.g. Object Cache which I have ON) or some faulty PHP files in WordPress Core (although I never touched them), with which wp-cli interfaces, I assume. My conducted testing which lead to no difference yet
Any more ideas? |
Please note: Personally I don't care for this bug.
|
Oh, it's definitely a bug, I don't deny that. I don't have any ideas what it might be. If I was able to reproduce the issue, I'd open the Phar file in vim and add some debugging checkpoints around the code in question. @wp-cli/committers Any ideas what the issue might be? |
I tried to reproduce this issue in my Mac and Windows setup but could not. I tried several combination like; WP CLI 2.10 and WP CLI latest and also WP 6.4 and WP 6.5 |
I'm running into this issue and it seems to me to have something to do with the name of the phar itself. I've reproduced this on Windows (Ubuntu WSL) and Debian bookworm. I've downloaded the latest phar directly from Github and tested this: $ php wp-cli.phar plugin status akismet
Plugin akismet details:
Name: Akismet Anti-spam: Spam Protection
Status: Inactive
Version: 5.3.3
Author: Automattic - Anti-spam Team
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
$ mv wp-cli.phar wp
$ php wp plugin status akismet
Error: Couldn't find plugin-status.mustache
$ This behavior presents itself whether running the phar explicitly from the php executable or when making it executable and executing it directly, either relatively or in the PATH. In debugging, this comes down to a difference between I'm really not sure if there's an easy general solution, but this is what seems to be causing the problem. |
After some more tinkering, I think I have a fairly efficient general solution. I'll be creating a pull request shortly. |
I can confirm that in my environment I have had my Interestingly even
although in reality the file was just named Does your pull request also correct that "somehow untrue" |
No, that was outside of the scope of the issue I was fixing. Once wp-cli/wp-cli-bundle#649 is merged, there's no reason that output couldn't be updated quite easily. Whether it would be accepted or not is another question I can't answer, though. |
@johnpbloch ok thanks for the info. I filed #5964 if what I observed is indeed a misrepresentation. |
Environment
Reproduction
Actual
Expected
Noteworthy
Works fine and returns me:
The text was updated successfully, but these errors were encountered: