Comments (10)
Hi @ericgopak,
Thanks for the report. This should already be accommodated for with https://github.com/wp-cli/wp-cli/pull/3268/files. Is there additional detail you can provide that might explain how your configuration is different?
from checksum-command.
Hi @danielbachhuber ,
The fix looks good by the look of it :) It seems to take care of both wp-admin/
and wp-includes/
, which was exactly the problem.
I don't currently have a setup to check out WP-CLI from Git, so I can't actually test it. But I think it's fine.
Thanks! I think you can close this issue for now.
from checksum-command.
@ericgopak To clarify, that change was implemented in v0.25.0. WP-CLI is currently at v1.5.0.
If the issue still manifests itself for you locally, then we'll need more detail on how to reproduce in order to help resolve. Our bug reporting guidelines offer a template you can follow.
from checksum-command.
@danielbachhuber Sorry for taking so long to respond. A quick peek into the issue has shown that the issue might be Windows-specific (my current working OS), and is still present in the latest WP-CLI version (v1.5.0). I want to help you out on this. I guess I should write a more detailed bug report and then I could fix it myself and submit a pull request.
I'm new to WP-CLI codebase, but I'm happy to submit my first pull request in the upcoming days.
If you agree, then we can re-open the issue and I'll proceed as described above.
from checksum-command.
I have the same problem (does not work via CMD, but works with the Windows Subsystem for Linux). I think the problem is that in the filter_file()
method (https://github.com/wp-cli/checksum-command/blob/master/src/Checksum_Core_Command.php#L140) there is a check for /
, but Windows has \
(so for example, $filepath
could be wp-content\index.php
), so the ^wp-(?!config\.php)([^\/]*)$
regex matches everything with wp-
at the beginning on Windows.
Unfortunately, I have no idea how to check if another regex would work, because I cannot edit the content of wp-cli.phar
in PhpStorm… Btw: would be great if there would be some post on how to develop for the WP-CLI (how to open the .phar
for debugging/testing (if that is the right way to do it), …) :)
from checksum-command.
Thanks for the additional detail, @florianbrinkmann. It makes sense that this is a bug specific to Windows.
Btw: would be great if there would be some post on how to develop for the WP-CLI
See https://make.wordpress.org/cli/handbook/
from checksum-command.
Thanks @danielbachhuber, found it – I already was aware of the handbook and searched there, but not in the Pull Requests chapter…
from checksum-command.
Thank you, @danielbachhuber and @florianbrinkmann, I've followed the guidelines for setting up WP-CLI for development locally.
Indeed, the issue was with the regex, which assumed only regular (*nix-style) slashes. Adding the backslash (escaped as \\\\
) solved the problem for me.
And to make it all a somewhat better bug report, here are steps to reproduce the issue:
- Have a fresh WordPress installation
- Create a new file under
/wp-content/
so that the path to the file includes either /wp-admin/
or/wp-includes/
, e.g.wordpress/wp-content/themes/MyTheme/wp-includes/some_file.php
- Run
wp core verify-checksums
from the root of this WordPress installation
Notes on the tested environment:
$ wp --info
OS: Windows NT 6.3 build 9600 (Windows 8.1 Professional Edition) AMD64
Shell: /bin/bash
PHP binary: /XXX/WAMP/bin/php/php7.0.10/php
PHP version: 7.0.10
php.ini used: X:\XXX\WAMP\bin\php\php7.0.10\php.ini
WP-CLI root dir: X:\XXX\wp-cli
WP-CLI vendor dir: X:\XXX\wp-cli/vendor
WP_CLI phar path:
WP-CLI packages dir: X:\XXX\home\XXX/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.0.0-alpha
from checksum-command.
Update: actually, it seems that the issue was more generic - with that bug in the regex expression any paths in any wp-*\
folders were reported as File should not exist
. With the changes from the pull request above this is no longer happening.
from checksum-command.
Closing this via #39
from checksum-command.
Related Issues (20)
- flags ancient files as "should not exist" but should flag as "deprecated, can be deleted" HOT 1
- `Could not retrieve the checksums` still visible with `--skip-plugins=<plugin-name>` HOT 5
- Add `--version` param to `wp plugin verify-checksums` HOT 2
- wp-cli core verify-checksums does not check extra themes HOT 2
- During plugin verify-checksum, failed plugins should be listed HOT 2
- --include-root does not work HOT 1
- Adding an exclusion option to `wp core verify-checksums` ? HOT 1
- Add command to check themes integrity in WP-CLI HOT 1
- Verification checks skipped when plugin missing main PHP file HOT 1
- verify-checksums does not list all added files HOT 9
- Plugin
- WordPress installation doesn't verify against checksums HOT 4
- Flag presence of unexpected files HOT 11
- Add an option to skip additional files check HOT 2
- Core verify-checksums command doesn't catch added files at ABSPATH directory HOT 3
- Flag to turn warnings into errors HOT 1
- Random messages: Could not retrieve the checksums for version x.y.z of plugin-name HOT 7
- Warning: Could not retrieve the checksums HOT 1
- Error: RuntimeException: Failed to get url when using `wp core verify-checksums` HOT 6
- Add --format argument to `wp core verify-checksums` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checksum-command.