Skip to content
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

Automatically populate wp-cli.local.yml for cli container #1520

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Sep 3, 2024

This is inspired by @swissspidy's reply to my Tweet (and blog post) about making it easier to run WP-CLI commands in wp-env. He suggests that we could use SSH as the mechanism to connect WP-CLI to the cli Docker container. After some digging, I found this is possible. However, it is complicated by the fact that the container IDs change every time that wp-env start runs. So this PR adds a lifecycle script to automatically populate the wp-cli.local.yml with the proper ssh config value.

When this is done, a globally installed WP-CLI will just work when inside when wp-env is started and the user is inside the repo subdirectory.

It is indeed faster than using npm run wp-env run cli wp (about twice as fast), however I'm seeing some strange behavior where the pager isn't working. For example, if I do wp --help, I can't scroll down in the text. I have to Ctrl+C to quit the pager (and then the scroll wheel in my Terminal is messed up where it starts scrolling back through my command history instead of scrolling the terminal output).

@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release labels Sep 3, 2024
@westonruter westonruter marked this pull request as draft September 3, 2024 23:26
Copy link

github-actions bot commented Sep 3, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@swissspidy
Copy link
Member

however I'm seeing some strange behavior where the pager isn't working. For example, if I do wp --help, I can't scroll down in the text. I have to Ctrl+C to quit the pager (and then the scroll wheel in my Terminal is messed up where it starts scrolling back through my command history instead of scrolling the terminal output).

Interesting 🤔 Not sure where that issue would lie, maybe with the container or the SSH connection?

@westonruter
Copy link
Member Author

It's puzzling to me. Here you can see that wp post list works just fine, but when an output is using a pager, then using either the Up or Down arrow keys or the scrollwheel result in ^[OB and ^[OA control characters being printed to the screen:

Screen.recording.2024-09-04.14.37.15.webm

Then once I do Ctrl+C, using the mouse scrollwheel causes bash history to be scrolled the same as if I was using Up and Down arrow keys on the keyboard.

@westonruter
Copy link
Member Author

Also, hitting q doesn't quit the pager either as expected.

@westonruter
Copy link
Member Author

This issue happens in the ChromeOS Terminal app, PhpStorm's built-in terminal, and the GNOME Terminal app.

@schlessera
Copy link
Member

@westonruter My first guess would be that the SSH connection does not allocate a full TTY, which would mean that interactive features (like pagers) will not work. You can try forcing the allocation of a full TTY by adding the -t flag to the execution of ssh.

I assume this is WP-CLI executing the actual ssh command, so you'll have to dig a bit to find out what exact arguments it is using to connect. Running the WP-CLI command with --debug might already shed some more light...

@westonruter
Copy link
Member Author

Here's the debug output:

Details

Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DeclareAbstractBaseCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFrameworkAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\ConfigureRunner (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeRequestsAutoloader (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$version to v2 (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$source to wp-cli (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$class_name to \WpOrg\Requests\Requests (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeColorization (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeLogger (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DefineProtectedCommands (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadExecCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadRequiredCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludePackageAutoloader (0.006s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFallbackAutoloader (0.006s)
Debug (bootstrap): Fallback autoloader paths: /home/westonruter/.config/composer/vendor/autoload.php (0.006s)
Debug (bootstrap): Loading detected autoloader: /home/westonruter/.config/composer/vendor/autoload.php (0.006s)
Debug (commands): Adding command: cache (0.013s)
Debug (commands): Adding command: transient (0.014s)
Debug (commands): Adding command: core (0.014s)
Debug (bootstrap): Attaching command 'core verify-checksums' to hook before_wp_load (0.015s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.015s)
Debug (commands): Adding command: plugin (0.015s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.016s)
Debug (bootstrap): Attaching command 'config edit' to hook before_wp_load (0.017s)
Debug (bootstrap): Attaching command 'config path' to hook before_wp_load (0.017s)
Debug (bootstrap): Attaching command 'config list' to hook before_wp_load (0.017s)
Debug (bootstrap): Attaching command 'config get' to hook before_wp_load (0.017s)
Debug (bootstrap): Attaching command 'config is-true' to hook before_wp_load (0.017s)
Debug (bootstrap): Attaching command 'config set' to hook before_wp_load (0.018s)
Debug (bootstrap): Attaching command 'config delete' to hook before_wp_load (0.018s)
Debug (bootstrap): Attaching command 'config has' to hook before_wp_load (0.018s)
Debug (bootstrap): Attaching command 'config shuffle-salts' to hook before_wp_load (0.018s)
Debug (commands): Adding command: config (0.018s)
Debug (bootstrap): Attaching command 'core download' to hook before_wp_load (0.02s)
Debug (bootstrap): Attaching command 'core version' to hook before_wp_load (0.02s)
Debug (commands): Adding command: core (0.02s)
Debug (commands): Adding command: cron (0.021s)
Debug (commands): Adding command: event in cron Namespace (0.021s)
Debug (commands): Adding command: schedule in cron Namespace (0.022s)
Debug (bootstrap): Attaching command 'db' to hook after_wp_config_load (0.023s)
Debug (bootstrap): Attaching command 'db clean' to hook after_wp_load (0.024s)
Debug (bootstrap): Attaching command 'db tables' to hook after_wp_load (0.024s)
Debug (bootstrap): Attaching command 'db size' to hook after_wp_load (0.024s)
Debug (bootstrap): Attaching command 'db prefix' to hook after_wp_load (0.024s)
Debug (bootstrap): Attaching command 'db search' to hook after_wp_load (0.024s)
Debug (bootstrap): Attaching command 'db columns' to hook after_wp_load (0.025s)
Debug (commands): Adding command: db (0.025s)
Debug (commands): Adding command: embed (0.025s)
Debug (commands): Adding command: fetch in embed Namespace (0.025s)
Debug (commands): Adding command: provider in embed Namespace (0.026s)
Debug (commands): Adding command: handler in embed Namespace (0.026s)
Debug (commands): Adding command: cache in embed Namespace (0.027s)
Debug (commands): Adding command: comment (0.028s)
Debug (commands): Adding command: meta in comment Namespace (0.029s)
Debug (commands): Adding command: menu (0.03s)
Debug (commands): Adding command: item in menu Namespace (0.03s)
Debug (commands): Adding command: location in menu Namespace (0.031s)
Debug (commands): Deferring command: network meta (0.031s)
Debug (commands): Adding command: option (0.032s)
Debug (commands): Adding command: post (0.033s)
Debug (commands): Adding command: meta in post Namespace (0.034s)
Debug (commands): Adding command: term in post Namespace (0.034s)
Debug (commands): Adding command: post-type (0.035s)
Debug (commands): Adding command: site (0.036s)
Debug (commands): Adding command: meta in site Namespace (0.036s)
Debug (commands): Adding command: option in site Namespace (0.037s)
Debug (commands): Adding command: taxonomy (0.038s)
Debug (commands): Adding command: term (0.039s)
Debug (commands): Adding command: meta in term Namespace (0.039s)
Debug (commands): Adding command: user (0.041s)
Debug (commands): Adding command: application-password in user Namespace (0.042s)
Debug (commands): Adding command: meta in user Namespace (0.042s)
Debug (commands): Adding command: session in user Namespace (0.042s)
Debug (commands): Adding command: term in user Namespace (0.043s)
Debug (commands): Adding command: network (0.043s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.043s)
Debug (hooks): On hook "after_add_command:network": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.043s)
Debug (commands): Adding command: meta in network Namespace (0.043s)
Debug (commands): Adding command: signup in user Namespace (0.044s)
Debug (bootstrap): Attaching command 'eval' to hook before_wp_load (0.044s)
Debug (commands): Adding command: eval (0.044s)
Debug (bootstrap): Attaching command 'eval-file' to hook before_wp_load (0.044s)
Debug (commands): Adding command: eval-file (0.044s)
Debug (commands): Adding command: export (0.045s)
Debug (commands): Adding command: plugin (0.047s)
Debug (commands): Adding command: auto-updates in plugin Namespace (0.048s)
Debug (commands): Adding command: theme (0.049s)
Debug (commands): Adding command: auto-updates in theme Namespace (0.05s)
Debug (commands): Adding command: mod in theme Namespace (0.05s)
Debug (bootstrap): Attaching command 'i18n' to hook before_wp_load (0.05s)
Debug (commands): Adding command: i18n (0.05s)
Debug (bootstrap): Attaching command 'i18n make-pot' to hook before_wp_load (0.052s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.052s)
Debug (bootstrap): Attaching command 'i18n make-json' to hook before_wp_load (0.052s)
Debug (commands): Adding command: make-json in i18n Namespace (0.052s)
Debug (bootstrap): Attaching command 'i18n make-mo' to hook before_wp_load (0.052s)
Debug (commands): Adding command: make-mo in i18n Namespace (0.052s)
Debug (bootstrap): Attaching command 'i18n make-php' to hook before_wp_load (0.053s)
Debug (commands): Adding command: make-php in i18n Namespace (0.053s)
Debug (bootstrap): Attaching command 'i18n update-po' to hook before_wp_load (0.053s)
Debug (commands): Adding command: update-po in i18n Namespace (0.053s)
Debug (commands): Adding command: import (0.053s)
Debug (commands): Deferring command: language core (0.054s)
Debug (commands): Deferring command: language plugin (0.054s)
Debug (commands): Deferring command: language theme (0.055s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/language-command/language-command.php at line 39 (0.055s)
Debug (commands): Adding command: switch-language in site Namespace (0.055s)
Debug (commands): Adding command: language (0.055s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.055s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.055s)
Debug (commands): Adding command: core in language Namespace (0.055s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.055s)
Debug (commands): Adding command: plugin in language Namespace (0.056s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.056s)
Debug (commands): Adding command: theme in language Namespace (0.056s)
Debug (bootstrap): Attaching command 'maintenance-mode' to hook after_wp_load (0.056s)
Debug (commands): Adding command: maintenance-mode (0.056s)
Debug (commands): Adding command: media (0.058s)
Debug (bootstrap): Attaching command 'package' to hook before_wp_load (0.059s)
Debug (commands): Adding command: package (0.059s)
Debug (commands): Adding command: rewrite (0.06s)
Debug (commands): Adding command: rewrite (0.06s)
Debug (commands): Adding command: cap (0.06s)
Debug (commands): Adding command: role (0.061s)
Debug (commands): Adding command: scaffold (0.062s)
Debug (commands): Adding command: search-replace (0.063s)
Debug (bootstrap): Attaching command 'server' to hook before_wp_load (0.063s)
Debug (commands): Adding command: server (0.063s)
Debug (commands): Adding command: shell (0.064s)
Debug (commands): Adding command: super-admin (0.064s)
Debug (commands): Adding command: widget (0.065s)
Debug (commands): Adding command: sidebar (0.065s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterFrameworkCommands (0.065s)
Debug (bootstrap): Adding framework command: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/commands/cli.php (0.065s)
Debug (bootstrap): Attaching command 'cli' to hook before_wp_load (0.066s)
Debug (bootstrap): Attaching command 'cli has-command' to hook after_wp_load (0.066s)
Debug (commands): Adding command: cli (0.066s)
Debug (bootstrap): Attaching command 'cli cache' to hook before_wp_load (0.066s)
Debug (commands): Adding command: cache in cli Namespace (0.066s)
Debug (bootstrap): Attaching command 'cli alias' to hook before_wp_load (0.066s)
Debug (commands): Adding command: alias in cli Namespace (0.066s)
Debug (bootstrap): Adding framework command: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/commands/help.php (0.066s)
Debug (commands): Adding command: help (0.067s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterDeferredCommands (0.067s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeContexts (0.067s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LaunchRunner (0.067s)
Debug (bootstrap): No readable global config found (0.067s)
Debug (bootstrap): Using project config: /home/westonruter/repos/performance/wp-cli.local.yml (0.067s)
Debug (bootstrap): argv: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php --debug option get blogname (0.067s)
Debug (bootstrap): SSH scheme: docker (0.067s)
Debug (bootstrap): SSH user:  (0.068s)
Debug (bootstrap): SSH host: a56685ddc903 (0.068s)
Debug (bootstrap): SSH port:  (0.068s)
Debug (bootstrap): SSH path:  (0.068s)
Debug (bootstrap): SSH key:  (0.068s)
Debug (bootstrap): SSH proxyjump:  (0.068s)
Debug (bootstrap): Running SSH command: docker exec -t 'a56685ddc903' sh -c 'wp '\''--debug'\'' '\''option'\'' '\''get'\'' '\''blogname'\''' (0.111s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DeclareAbstractBaseCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFrameworkAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\ConfigureRunner (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeRequestsAutoloader (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$version to v2 (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$source to wp-core (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$class_name to \WpOrg\Requests\Requests (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeColorization (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeLogger (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DefineProtectedCommands (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadExecCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadRequiredCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludePackageAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFallbackAutoloader (0.006s)
Debug (bootstrap): Fallback autoloader paths: phar://wp-cli.phar/vendor/autoload.php (0.006s)
Debug (bootstrap): Loading detected autoloader: phar://wp-cli.phar/vendor/autoload.php (0.006s)
Debug (bootstrap): Attaching command 'config edit' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config path' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config list' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config get' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config is-true' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config set' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config delete' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config has' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config shuffle-salts' to hook before_wp_load (0.009s)
Debug (commands): Adding command: config (0.009s)
Debug (bootstrap): Attaching command 'core download' to hook before_wp_load (0.01s)
Debug (bootstrap): Attaching command 'core version' to hook before_wp_load (0.01s)
Debug (commands): Adding command: core (0.011s)
Debug (bootstrap): Attaching command 'eval' to hook before_wp_load (0.011s)
Debug (commands): Adding command: eval (0.011s)
Debug (bootstrap): Attaching command 'eval-file' to hook before_wp_load (0.011s)
Debug (commands): Adding command: eval-file (0.011s)
Debug (commands): Adding command: cache (0.011s)
Debug (commands): Adding command: transient (0.012s)
Debug (bootstrap): Attaching command 'core verify-checksums' to hook before_wp_load (0.012s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.012s)
Debug (commands): Adding command: plugin (0.012s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.013s)
Debug (commands): Adding command: cron (0.013s)
Debug (commands): Adding command: event in cron Namespace (0.013s)
Debug (commands): Adding command: schedule in cron Namespace (0.014s)
Debug (bootstrap): Attaching command 'db' to hook after_wp_config_load (0.015s)
Debug (bootstrap): Attaching command 'db clean' to hook after_wp_load (0.016s)
Debug (bootstrap): Attaching command 'db tables' to hook after_wp_load (0.016s)
Debug (bootstrap): Attaching command 'db size' to hook after_wp_load (0.016s)
Debug (bootstrap): Attaching command 'db prefix' to hook after_wp_load (0.016s)
Debug (bootstrap): Attaching command 'db search' to hook after_wp_load (0.016s)
Debug (bootstrap): Attaching command 'db columns' to hook after_wp_load (0.016s)
Debug (commands): Adding command: db (0.016s)
Debug (commands): Adding command: embed (0.016s)
Debug (commands): Adding command: fetch in embed Namespace (0.017s)
Debug (commands): Adding command: provider in embed Namespace (0.017s)
Debug (commands): Adding command: handler in embed Namespace (0.017s)
Debug (commands): Adding command: cache in embed Namespace (0.017s)
Debug (commands): Adding command: comment (0.019s)
Debug (commands): Adding command: meta in comment Namespace (0.019s)
Debug (commands): Adding command: menu (0.019s)
Debug (commands): Adding command: item in menu Namespace (0.02s)
Debug (commands): Adding command: location in menu Namespace (0.02s)
Debug (commands): Deferring command: network meta (0.02s)
Debug (commands): Adding command: option (0.021s)
Debug (commands): Adding command: post (0.022s)
Debug (commands): Adding command: meta in post Namespace (0.022s)
Debug (commands): Adding command: term in post Namespace (0.023s)
Debug (commands): Adding command: post-type (0.023s)
Debug (commands): Adding command: site (0.024s)
Debug (commands): Adding command: meta in site Namespace (0.024s)
Debug (commands): Adding command: option in site Namespace (0.025s)
Debug (commands): Adding command: taxonomy (0.025s)
Debug (commands): Adding command: term (0.026s)
Debug (commands): Adding command: meta in term Namespace (0.026s)
Debug (commands): Adding command: user (0.027s)
Debug (commands): Adding command: application-password in user Namespace (0.028s)
Debug (commands): Adding command: meta in user Namespace (0.028s)
Debug (commands): Adding command: session in user Namespace (0.029s)
Debug (commands): Adding command: term in user Namespace (0.029s)
Debug (commands): Adding command: network (0.029s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.029s)
Debug (hooks): On hook "after_add_command:network": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.029s)
Debug (commands): Adding command: meta in network Namespace (0.029s)
Debug (commands): Adding command: signup in user Namespace (0.03s)
Debug (commands): Adding command: export (0.03s)
Debug (commands): Adding command: plugin (0.034s)
Debug (commands): Adding command: auto-updates in plugin Namespace (0.034s)
Debug (commands): Adding command: theme (0.035s)
Debug (commands): Adding command: auto-updates in theme Namespace (0.035s)
Debug (commands): Adding command: mod in theme Namespace (0.036s)
Debug (bootstrap): Attaching command 'i18n' to hook before_wp_load (0.036s)
Debug (commands): Adding command: i18n (0.036s)
Debug (bootstrap): Attaching command 'i18n make-pot' to hook before_wp_load (0.037s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.037s)
Debug (bootstrap): Attaching command 'i18n make-json' to hook before_wp_load (0.038s)
Debug (commands): Adding command: make-json in i18n Namespace (0.038s)
Debug (bootstrap): Attaching command 'i18n make-mo' to hook before_wp_load (0.038s)
Debug (commands): Adding command: make-mo in i18n Namespace (0.038s)
Debug (bootstrap): Attaching command 'i18n make-php' to hook before_wp_load (0.038s)
Debug (commands): Adding command: make-php in i18n Namespace (0.038s)
Debug (bootstrap): Attaching command 'i18n update-po' to hook before_wp_load (0.038s)
Debug (commands): Adding command: update-po in i18n Namespace (0.039s)
Debug (commands): Adding command: import (0.039s)
Debug (commands): Deferring command: language core (0.04s)
Debug (commands): Deferring command: language plugin (0.04s)
Debug (commands): Deferring command: language theme (0.041s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/language-command/language-command.php at line 39 (0.041s)
Debug (commands): Adding command: switch-language in site Namespace (0.041s)
Debug (commands): Adding command: language (0.041s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.041s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.041s)
Debug (commands): Adding command: core in language Namespace (0.041s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.041s)
Debug (commands): Adding command: plugin in language Namespace (0.042s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.042s)
Debug (commands): Adding command: theme in language Namespace (0.042s)
Debug (bootstrap): Attaching command 'maintenance-mode' to hook after_wp_load (0.043s)
Debug (commands): Adding command: maintenance-mode (0.043s)
Debug (commands): Adding command: media (0.045s)
Debug (bootstrap): Attaching command 'package' to hook before_wp_load (0.046s)
Debug (commands): Adding command: package (0.046s)
Debug (commands): Adding command: rewrite (0.047s)
Debug (commands): Adding command: rewrite (0.047s)
Debug (commands): Adding command: cap (0.047s)
Debug (commands): Adding command: role (0.048s)
Debug (commands): Adding command: scaffold (0.049s)
Debug (commands): Adding command: search-replace (0.05s)
Debug (bootstrap): Attaching command 'server' to hook before_wp_load (0.051s)
Debug (commands): Adding command: server (0.051s)
Debug (commands): Adding command: shell (0.051s)
Debug (commands): Adding command: super-admin (0.051s)
Debug (commands): Adding command: widget (0.052s)
Debug (commands): Adding command: sidebar (0.052s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterFrameworkCommands (0.052s)
Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/cli.php (0.053s)
Debug (bootstrap): Attaching command 'cli' to hook before_wp_load (0.054s)
Debug (bootstrap): Attaching command 'cli has-command' to hook after_wp_load (0.054s)
Debug (commands): Adding command: cli (0.054s)
Debug (bootstrap): Attaching command 'cli cache' to hook before_wp_load (0.054s)
westonruter@penguin:~/repos/performance (add/wp-cli-docker-config)$ wp --debug option get blogname
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DeclareAbstractBaseCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFrameworkAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\ConfigureRunner (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeRequestsAutoloader (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$version to v2 (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$source to wp-cli (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$class_name to \WpOrg\Requests\Requests (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeColorization (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeLogger (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DefineProtectedCommands (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadExecCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadRequiredCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludePackageAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFallbackAutoloader (0.005s)
Debug (bootstrap): Fallback autoloader paths: /home/westonruter/.config/composer/vendor/autoload.php (0.005s)
Debug (bootstrap): Loading detected autoloader: /home/westonruter/.config/composer/vendor/autoload.php (0.005s)
Debug (commands): Adding command: cache (0.009s)
Debug (commands): Adding command: transient (0.01s)
Debug (commands): Adding command: core (0.01s)
Debug (bootstrap): Attaching command 'core verify-checksums' to hook before_wp_load (0.011s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.011s)
Debug (commands): Adding command: plugin (0.011s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.011s)
Debug (bootstrap): Attaching command 'config edit' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config path' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config list' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config get' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config is-true' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config set' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config delete' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config has' to hook before_wp_load (0.012s)
Debug (bootstrap): Attaching command 'config shuffle-salts' to hook before_wp_load (0.012s)
Debug (commands): Adding command: config (0.012s)
Debug (bootstrap): Attaching command 'core download' to hook before_wp_load (0.014s)
Debug (bootstrap): Attaching command 'core version' to hook before_wp_load (0.014s)
Debug (commands): Adding command: core (0.014s)
Debug (commands): Adding command: cron (0.014s)
Debug (commands): Adding command: event in cron Namespace (0.015s)
Debug (commands): Adding command: schedule in cron Namespace (0.015s)
Debug (bootstrap): Attaching command 'db' to hook after_wp_config_load (0.017s)
Debug (bootstrap): Attaching command 'db clean' to hook after_wp_load (0.017s)
Debug (bootstrap): Attaching command 'db tables' to hook after_wp_load (0.017s)
Debug (bootstrap): Attaching command 'db size' to hook after_wp_load (0.017s)
Debug (bootstrap): Attaching command 'db prefix' to hook after_wp_load (0.017s)
Debug (bootstrap): Attaching command 'db search' to hook after_wp_load (0.017s)
Debug (bootstrap): Attaching command 'db columns' to hook after_wp_load (0.017s)
Debug (commands): Adding command: db (0.018s)
Debug (commands): Adding command: embed (0.018s)
Debug (commands): Adding command: fetch in embed Namespace (0.018s)
Debug (commands): Adding command: provider in embed Namespace (0.019s)
Debug (commands): Adding command: handler in embed Namespace (0.019s)
Debug (commands): Adding command: cache in embed Namespace (0.019s)
Debug (commands): Adding command: comment (0.02s)
Debug (commands): Adding command: meta in comment Namespace (0.021s)
Debug (commands): Adding command: menu (0.021s)
Debug (commands): Adding command: item in menu Namespace (0.021s)
Debug (commands): Adding command: location in menu Namespace (0.021s)
Debug (commands): Deferring command: network meta (0.022s)
Debug (commands): Adding command: option (0.022s)
Debug (commands): Adding command: post (0.023s)
Debug (commands): Adding command: meta in post Namespace (0.023s)
Debug (commands): Adding command: term in post Namespace (0.024s)
Debug (commands): Adding command: post-type (0.024s)
Debug (commands): Adding command: site (0.025s)
Debug (commands): Adding command: meta in site Namespace (0.025s)
Debug (commands): Adding command: option in site Namespace (0.026s)
Debug (commands): Adding command: taxonomy (0.026s)
Debug (commands): Adding command: term (0.027s)
Debug (commands): Adding command: meta in term Namespace (0.027s)
Debug (commands): Adding command: user (0.028s)
Debug (commands): Adding command: application-password in user Namespace (0.029s)
Debug (commands): Adding command: meta in user Namespace (0.029s)
Debug (commands): Adding command: session in user Namespace (0.029s)
Debug (commands): Adding command: term in user Namespace (0.03s)
Debug (commands): Adding command: network (0.03s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.03s)
Debug (hooks): On hook "after_add_command:network": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.03s)
Debug (commands): Adding command: meta in network Namespace (0.03s)
Debug (commands): Adding command: signup in user Namespace (0.031s)
Debug (bootstrap): Attaching command 'eval' to hook before_wp_load (0.031s)
Debug (commands): Adding command: eval (0.031s)
Debug (bootstrap): Attaching command 'eval-file' to hook before_wp_load (0.031s)
Debug (commands): Adding command: eval-file (0.031s)
Debug (commands): Adding command: export (0.032s)
Debug (commands): Adding command: plugin (0.034s)
Debug (commands): Adding command: auto-updates in plugin Namespace (0.034s)
Debug (commands): Adding command: theme (0.035s)
Debug (commands): Adding command: auto-updates in theme Namespace (0.035s)
Debug (commands): Adding command: mod in theme Namespace (0.035s)
Debug (bootstrap): Attaching command 'i18n' to hook before_wp_load (0.036s)
Debug (commands): Adding command: i18n (0.036s)
Debug (bootstrap): Attaching command 'i18n make-pot' to hook before_wp_load (0.036s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.036s)
Debug (bootstrap): Attaching command 'i18n make-json' to hook before_wp_load (0.037s)
Debug (commands): Adding command: make-json in i18n Namespace (0.037s)
Debug (bootstrap): Attaching command 'i18n make-mo' to hook before_wp_load (0.037s)
Debug (commands): Adding command: make-mo in i18n Namespace (0.037s)
Debug (bootstrap): Attaching command 'i18n make-php' to hook before_wp_load (0.037s)
Debug (commands): Adding command: make-php in i18n Namespace (0.037s)
Debug (bootstrap): Attaching command 'i18n update-po' to hook before_wp_load (0.037s)
Debug (commands): Adding command: update-po in i18n Namespace (0.037s)
Debug (commands): Adding command: import (0.037s)
Debug (commands): Deferring command: language core (0.038s)
Debug (commands): Deferring command: language plugin (0.038s)
Debug (commands): Deferring command: language theme (0.038s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/language-command/language-command.php at line 39 (0.039s)
Debug (commands): Adding command: switch-language in site Namespace (0.039s)
Debug (commands): Adding command: language (0.039s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.039s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.039s)
Debug (commands): Adding command: core in language Namespace (0.039s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.039s)
Debug (commands): Adding command: plugin in language Namespace (0.039s)
Debug (hooks): On hook "after_add_command:language": Closure in file /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.039s)
Debug (commands): Adding command: theme in language Namespace (0.039s)
Debug (bootstrap): Attaching command 'maintenance-mode' to hook after_wp_load (0.04s)
Debug (commands): Adding command: maintenance-mode (0.04s)
Debug (commands): Adding command: media (0.041s)
Debug (bootstrap): Attaching command 'package' to hook before_wp_load (0.042s)
Debug (commands): Adding command: package (0.042s)
Debug (commands): Adding command: rewrite (0.043s)
Debug (commands): Adding command: rewrite (0.043s)
Debug (commands): Adding command: cap (0.043s)
Debug (commands): Adding command: role (0.044s)
Debug (commands): Adding command: scaffold (0.045s)
Debug (commands): Adding command: search-replace (0.046s)
Debug (bootstrap): Attaching command 'server' to hook before_wp_load (0.046s)
Debug (commands): Adding command: server (0.046s)
Debug (commands): Adding command: shell (0.046s)
Debug (commands): Adding command: super-admin (0.047s)
Debug (commands): Adding command: widget (0.047s)
Debug (commands): Adding command: sidebar (0.047s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterFrameworkCommands (0.047s)
Debug (bootstrap): Adding framework command: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/commands/cli.php (0.047s)
Debug (bootstrap): Attaching command 'cli' to hook before_wp_load (0.048s)
Debug (bootstrap): Attaching command 'cli has-command' to hook after_wp_load (0.048s)
Debug (commands): Adding command: cli (0.048s)
Debug (bootstrap): Attaching command 'cli cache' to hook before_wp_load (0.048s)
Debug (commands): Adding command: cache in cli Namespace (0.048s)
Debug (bootstrap): Attaching command 'cli alias' to hook before_wp_load (0.048s)
Debug (commands): Adding command: alias in cli Namespace (0.049s)
Debug (bootstrap): Adding framework command: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/php/commands/help.php (0.049s)
Debug (commands): Adding command: help (0.049s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterDeferredCommands (0.049s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeContexts (0.05s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LaunchRunner (0.05s)
Debug (bootstrap): No readable global config found (0.05s)
Debug (bootstrap): Using project config: /home/westonruter/repos/performance/wp-cli.local.yml (0.05s)
Debug (bootstrap): argv: /home/westonruter/.config/composer/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php --debug option get blogname (0.05s)
Debug (bootstrap): SSH scheme: docker (0.051s)
Debug (bootstrap): SSH user:  (0.051s)
Debug (bootstrap): SSH host: a56685ddc903 (0.051s)
Debug (bootstrap): SSH port:  (0.051s)
Debug (bootstrap): SSH path:  (0.051s)
Debug (bootstrap): SSH key:  (0.051s)
Debug (bootstrap): SSH proxyjump:  (0.051s)
Debug (bootstrap): Running SSH command: docker exec -t 'a56685ddc903' sh -c 'wp '\''--debug'\'' '\''option'\'' '\''get'\'' '\''blogname'\''' (0.096s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DeclareAbstractBaseCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFrameworkAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\ConfigureRunner (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeRequestsAutoloader (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$version to v2 (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$source to wp-core (0.005s)
Debug (bootstrap): Setting RequestsLibrary::$class_name to \WpOrg\Requests\Requests (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeColorization (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeLogger (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\DefineProtectedCommands (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadExecCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LoadRequiredCommand (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludePackageAutoloader (0.005s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\IncludeFallbackAutoloader (0.005s)
Debug (bootstrap): Fallback autoloader paths: phar://wp-cli.phar/vendor/autoload.php (0.005s)
Debug (bootstrap): Loading detected autoloader: phar://wp-cli.phar/vendor/autoload.php (0.005s)
Debug (bootstrap): Attaching command 'config edit' to hook before_wp_load (0.008s)
Debug (bootstrap): Attaching command 'config path' to hook before_wp_load (0.008s)
Debug (bootstrap): Attaching command 'config list' to hook before_wp_load (0.008s)
Debug (bootstrap): Attaching command 'config get' to hook before_wp_load (0.008s)
Debug (bootstrap): Attaching command 'config is-true' to hook before_wp_load (0.008s)
Debug (bootstrap): Attaching command 'config set' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config delete' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config has' to hook before_wp_load (0.009s)
Debug (bootstrap): Attaching command 'config shuffle-salts' to hook before_wp_load (0.009s)
Debug (commands): Adding command: config (0.009s)
Debug (bootstrap): Attaching command 'core download' to hook before_wp_load (0.01s)
Debug (bootstrap): Attaching command 'core version' to hook before_wp_load (0.01s)
Debug (commands): Adding command: core (0.01s)
Debug (bootstrap): Attaching command 'eval' to hook before_wp_load (0.01s)
Debug (commands): Adding command: eval (0.01s)
Debug (bootstrap): Attaching command 'eval-file' to hook before_wp_load (0.01s)
Debug (commands): Adding command: eval-file (0.01s)
Debug (commands): Adding command: cache (0.01s)
Debug (commands): Adding command: transient (0.011s)
Debug (bootstrap): Attaching command 'core verify-checksums' to hook before_wp_load (0.011s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.011s)
Debug (commands): Adding command: plugin (0.011s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.011s)
Debug (commands): Adding command: cron (0.012s)
Debug (commands): Adding command: event in cron Namespace (0.012s)
Debug (commands): Adding command: schedule in cron Namespace (0.012s)
Debug (bootstrap): Attaching command 'db' to hook after_wp_config_load (0.013s)
Debug (bootstrap): Attaching command 'db clean' to hook after_wp_load (0.013s)
Debug (bootstrap): Attaching command 'db tables' to hook after_wp_load (0.013s)
Debug (bootstrap): Attaching command 'db size' to hook after_wp_load (0.014s)
Debug (bootstrap): Attaching command 'db prefix' to hook after_wp_load (0.014s)
Debug (bootstrap): Attaching command 'db search' to hook after_wp_load (0.014s)
Debug (bootstrap): Attaching command 'db columns' to hook after_wp_load (0.014s)
Debug (commands): Adding command: db (0.014s)
Debug (commands): Adding command: embed (0.014s)
Debug (commands): Adding command: fetch in embed Namespace (0.014s)
Debug (commands): Adding command: provider in embed Namespace (0.015s)
Debug (commands): Adding command: handler in embed Namespace (0.015s)
Debug (commands): Adding command: cache in embed Namespace (0.015s)
Debug (commands): Adding command: comment (0.016s)
Debug (commands): Adding command: meta in comment Namespace (0.016s)
Debug (commands): Adding command: menu (0.017s)
Debug (commands): Adding command: item in menu Namespace (0.017s)
Debug (commands): Adding command: location in menu Namespace (0.017s)
Debug (commands): Deferring command: network meta (0.017s)
Debug (commands): Adding command: option (0.018s)
Debug (commands): Adding command: post (0.019s)
Debug (commands): Adding command: meta in post Namespace (0.019s)
Debug (commands): Adding command: term in post Namespace (0.02s)
Debug (commands): Adding command: post-type (0.02s)
Debug (commands): Adding command: site (0.021s)
Debug (commands): Adding command: meta in site Namespace (0.021s)
Debug (commands): Adding command: option in site Namespace (0.021s)
Debug (commands): Adding command: taxonomy (0.022s)
Debug (commands): Adding command: term (0.022s)
Debug (commands): Adding command: meta in term Namespace (0.023s)
Debug (commands): Adding command: user (0.024s)
Debug (commands): Adding command: application-password in user Namespace (0.024s)
Debug (commands): Adding command: meta in user Namespace (0.024s)
Debug (commands): Adding command: session in user Namespace (0.024s)
Debug (commands): Adding command: term in user Namespace (0.024s)
Debug (commands): Adding command: network (0.025s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.025s)
Debug (hooks): On hook "after_add_command:network": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.025s)
Debug (commands): Adding command: meta in network Namespace (0.025s)
Debug (commands): Adding command: signup in user Namespace (0.025s)
Debug (commands): Adding command: export (0.026s)
Debug (commands): Adding command: plugin (0.028s)
Debug (commands): Adding command: auto-updates in plugin Namespace (0.028s)
Debug (commands): Adding command: theme (0.029s)
Debug (commands): Adding command: auto-updates in theme Namespace (0.029s)
Debug (commands): Adding command: mod in theme Namespace (0.029s)
Debug (bootstrap): Attaching command 'i18n' to hook before_wp_load (0.029s)
Debug (commands): Adding command: i18n (0.029s)
Debug (bootstrap): Attaching command 'i18n make-pot' to hook before_wp_load (0.031s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.031s)
Debug (bootstrap): Attaching command 'i18n make-json' to hook before_wp_load (0.031s)
Debug (commands): Adding command: make-json in i18n Namespace (0.031s)
Debug (bootstrap): Attaching command 'i18n make-mo' to hook before_wp_load (0.032s)
Debug (commands): Adding command: make-mo in i18n Namespace (0.032s)
Debug (bootstrap): Attaching command 'i18n make-php' to hook before_wp_load (0.032s)
Debug (commands): Adding command: make-php in i18n Namespace (0.032s)
Debug (bootstrap): Attaching command 'i18n update-po' to hook before_wp_load (0.032s)
Debug (commands): Adding command: update-po in i18n Namespace (0.032s)
Debug (commands): Adding command: import (0.033s)
Debug (commands): Deferring command: language core (0.034s)
Debug (commands): Deferring command: language plugin (0.034s)
Debug (commands): Deferring command: language theme (0.035s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/language-command/language-command.php at line 39 (0.035s)
Debug (commands): Adding command: switch-language in site Namespace (0.035s)
Debug (commands): Adding command: language (0.035s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.035s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.035s)
Debug (commands): Adding command: core in language Namespace (0.035s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.035s)
Debug (commands): Adding command: plugin in language Namespace (0.035s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 695 (0.035s)
Debug (commands): Adding command: theme in language Namespace (0.036s)
Debug (bootstrap): Attaching command 'maintenance-mode' to hook after_wp_load (0.036s)
Debug (commands): Adding command: maintenance-mode (0.036s)
Debug (commands): Adding command: media (0.038s)
Debug (bootstrap): Attaching command 'package' to hook before_wp_load (0.039s)
Debug (commands): Adding command: package (0.039s)
Debug (commands): Adding command: rewrite (0.04s)
Debug (commands): Adding command: rewrite (0.04s)
Debug (commands): Adding command: cap (0.04s)
Debug (commands): Adding command: role (0.041s)
Debug (commands): Adding command: scaffold (0.042s)
Debug (commands): Adding command: search-replace (0.043s)
Debug (bootstrap): Attaching command 'server' to hook before_wp_load (0.044s)
Debug (commands): Adding command: server (0.044s)
Debug (commands): Adding command: shell (0.044s)
Debug (commands): Adding command: super-admin (0.044s)
Debug (commands): Adding command: widget (0.045s)
Debug (commands): Adding command: sidebar (0.045s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterFrameworkCommands (0.045s)
Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/cli.php (0.045s)
Debug (bootstrap): Attaching command 'cli' to hook before_wp_load (0.046s)
Debug (bootstrap): Attaching command 'cli has-command' to hook after_wp_load (0.047s)
Debug (commands): Adding command: cli (0.047s)
Debug (bootstrap): Attaching command 'cli cache' to hook before_wp_load (0.047s)
Debug (commands): Adding command: cache in cli Namespace (0.047s)
Debug (bootstrap): Attaching command 'cli alias' to hook before_wp_load (0.047s)
Debug (commands): Adding command: alias in cli Namespace (0.047s)
Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/help.php (0.047s)
Debug (commands): Adding command: help (0.048s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\RegisterDeferredCommands (0.048s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\InitializeContexts (0.048s)
Debug (bootstrap): Processing bootstrap step: WP_CLI\Bootstrap\LaunchRunner (0.048s)
Debug (bootstrap): No readable global config found (0.049s)
Debug (bootstrap): No project config found (0.049s)
Debug (bootstrap): argv: /usr/local/bin/wp --debug option get blogname (0.049s)
Debug (bootstrap): ABSPATH defined: /var/www/html/ (0.049s)
Debug (hooks): Executing hook: before_wp_load (0.049s)
Debug (context): Using context 'cli' (0.049s)
Debug (bootstrap): Begin WordPress load (0.049s)
Debug (bootstrap): wp-config.php path: /var/www/html/wp-config.php (0.049s)
Debug (bootstrap): Looking for UTF-8 BOM (0.049s)
Debug (bootstrap): Looking for UTF-16 (BE) BOM (0.049s)
Debug (bootstrap): Looking for UTF-16 (LE) BOM (0.049s)
Debug (hooks): Executing hook: after_wp_config_load (0.05s)
Debug (bootstrap): Loaded WordPress (0.186s)
Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.186s)
Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.186s)
Debug (bootstrap): Running command: option get (0.186s)

Of note:

Debug (bootstrap): Running SSH command: docker exec -t 'a56685ddc903' sh -c 'wp '\''--debug'\'' '\''option'\'' '\''get'\'' '\''blogname'\''' (0.111s)

@schlessera
Copy link
Member

From what I've found so far, it seems like adding the -i flag to the docker exec command that WP-CLI is executing helps. This is to keep the execution interactive. If the -i is missing, STDIN is immediately closed again, so the arrow keys and other control characters are just printed because the STDIN pipe from docker does not accept them anymore to interpret...

Now, the question is whether this should always be added, or whether we need a separate flag for this.

@schlessera
Copy link
Member

schlessera commented Sep 4, 2024

image

image

When I execute this same command without the -i flag, it shows the wp shell prompt, but it is immediately dead and does not accept any input. Any control characters are just echoed into the terminal.

@westonruter
Copy link
Member Author

I can confirm that adding -i fixes the issue!

@schlessera
Copy link
Member

Ok, the question then is whether adding the -i breaks other things that shan't be broken...

@westonruter
Copy link
Member Author

Should WP-CLI automatically add -i if posix_isatty(STDIN) is true?

@swissspidy
Copy link
Member

wp-cli/wp-cli#5974 looks related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants