Error testing WP-CLI commands

I’m trying to test some WP-CLI commands that used to work. Currently the error I’m getting is as follows.

Unable to open ‘class-wp-cli.php’: Unable to read file (Unknown (FileSystemError): Error: ENOTDIR: not a directory, stat ‘/Applications/Local Beta.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/class-wp-cli.php’).

This is the class, https://github.com/afragen/github-updater/blob/develop/src/GitHub_Updater/WP_CLI/CLI_Integration.php

I’m reasonably certain it has to do with how WP-CLI is included in Local Beta as that path doesn’t exist beyone wp-cli.phar.

@clay Any thoughts?

Apparently something changed in WP-CLI that now requires using the add_command() after the class is declared. Previously this worked.

I’ve fixed the error in my code and everything is now better. :man_facepalming:

Awesome, thanks for the update! You had me scratching my head. :joy:

Thankfully a user posted an issue with enough information for me to figure it out.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.