From 5c4eeaae23e80c91f2905d03d60c47877e5f039c Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Wed, 2 Aug 2023 16:32:04 -0700 Subject: [PATCH] Revert "fix: escape shell command in wp-cli update function (#5818)" (#5822) This reverts commit 2696b5ab04067b1ed98a7d62199109175f2e5c9a. --- php/commands/src/CLI_Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/commands/src/CLI_Command.php b/php/commands/src/CLI_Command.php index d25888187f..9ed7e080e7 100644 --- a/php/commands/src/CLI_Command.php +++ b/php/commands/src/CLI_Command.php @@ -357,7 +357,7 @@ public function update( $_, $assoc_args ) { $allow_root = WP_CLI::get_runner()->config['allow-root'] ? '--allow-root' : ''; $php_binary = Utils\get_php_binary(); - $process = Process::create( Utils\esc_cmd( '%s %s --info %s', $php_binary, $temp, $allow_root ) ); + $process = Process::create( "{$php_binary} $temp --info {$allow_root}" ); $result = $process->run(); if ( 0 !== $result->return_code || false === stripos( $result->stdout, 'WP-CLI version' ) ) { $multi_line = explode( PHP_EOL, $result->stderr );