-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fatal error with WordPress as a submodule #1
Comments
Thanks for the report. This is happening because your git repo is not located at ABSPATH. For the moment, this is hardcoded into the tool, though there's a note that says to fix it! https://github.com/boonebgorges/wp-cli-git-helper/blob/master/wp-cli-git-helper.php#L55 |
ok thanks! |
You got it! A proper fix for this is pretty straightforward - instead of hardcoding |
Sure, I'll do a PR :) |
Just ran into this too. Another solution might be to search recursively from WP_PLUGIN_DIR up the directory tree until a directory is found with a .git folder. This would work for basic installs and ones where Wordpress is a submodule. |
Should I submit a PR for this? Currently I just check if |
Walking up the tree recursively seems dangerous to me - you wouldn't want to accidentally commit to the incorrect repo. A PR that implements this idea #1 (comment) seems safer to me. (You can then define a default for the new flag in your wp-cli.yml file.) |
The text was updated successfully, but these errors were encountered: