Skip to content

Commit beb9b8a

Browse files
author
Raphaël Droz
committed
allow remote binary customization. Could be /custom/path/wp but sudo -u user /some/wp would also allow running the remote wp under a distinct user
1 parent ba1ccab commit beb9b8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/WP_CLI/Runner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ private function run_ssh_command( $connection_string ) {
504504
$env_vars .= 'WP_CLI_STRICT_ARGS_MODE=1 ';
505505
}
506506

507-
$wp_binary = 'wp';
507+
$wp_binary = getenv( 'WP_CLI_BINARY' ) ?: 'wp';
508508
$wp_args = array_slice( $GLOBALS['argv'], 1 );
509509

510510
if ( $this->alias && ! empty( $wp_args[0] ) && $this->alias === $wp_args[0] ) {

0 commit comments

Comments
 (0)