eightshift-libs icon indicating copy to clipboard operation
eightshift-libs copied to clipboard

WP CLI command for plugin install/update is not working

Open gabriel-glo opened this issue 3 years ago • 1 comments

Describe your bug

Command parameters [--skip_core=<skip_core>] [--skip_plugins=<skip_plugins>] [--skip_plugins_core=<skip_plugins_core>] … are validated as boolean type, when they are strings type. There are multiple instances in UpdateCli.php that look like:

// Check if plugins key exists in config.
	if (!$skipPlugins) {
...
// Check if plugins core key exists in config.
	if (!$skipPluginsCore) {
...

Switching these conditionals to something like this:

// Check if plugins key exists in config.
	if ($skipPlugins === 'false') {

... 

if ($skipPluginsCore  === 'false') {

fixes the issue.

Steps to Reproduce

  1. Run wp boilerplate run update command
  2. Nothing happens and I just get Success: All commands are finished. message

Expected behavior

I expect to have WP updated, plugins from setup.json installed if not present (updated otherwise)

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in this repo.

Yes

Please confirm that you have searched in our documentation and couldn't find the answer.

Yes

Please confirm that your bug occurs with all plugins uninstalled and with the default WordPress theme active.

Yes

gabriel-glo avatar Jul 28 '22 11:07 gabriel-glo

The PR was made but I need to just cherry pick things from it: https://github.com/infinum/eightshift-libs/pull/303

dingo-d avatar Jul 28 '22 11:07 dingo-d