Skip to content

Commit

Permalink
Revert "fix: escape shell command in wp-cli update function (#5818)" (#…
Browse files Browse the repository at this point in the history
…5822)

This reverts commit 2696b5a.
  • Loading branch information
danielbachhuber committed Aug 2, 2023
1 parent 2696b5a commit 5c4eeaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/commands/src/CLI_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 5c4eeaa

Please sign in to comment.