File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -300,8 +300,15 @@ public function generate_ssh_command( string $command = '' ): string {
300300
301301 $ placeholder = '' === $ command ? $ this ->get_random_hash () : '' ;
302302
303+ // Get SSH bits without path
304+ // Because https://github.com/wp-cli/wp-cli/blob/3ca317ad8b50ebaf9580373a383490a82b768f4a/php/WP_CLI/Runner.php#L654-L657
305+ // introduced in 2.12 https://github.com/wp-cli/wp-cli/commit/82772d90cfe12af1002df1312239cd61ebbb7dab
306+ // breaks rsh
307+ $ ssh_bits = $ this ->get_ssh_bits ();
308+ unset( $ ssh_bits ['path ' ] );
309+
303310 /** @var string $ssh_command */
304- $ ssh_command = $ generate_ssh ->invoke ( $ runner , $ this -> get_ssh_bits () , '' !== $ placeholder ? $ placeholder : $ command );
311+ $ ssh_command = $ generate_ssh ->invoke ( $ runner , $ ssh_bits , '' !== $ placeholder ? $ placeholder : $ command );
305312
306313 if ( $ placeholder ) {
307314 $ ssh_command = trim ( str_replace ( escapeshellarg ( $ placeholder ), '' , $ ssh_command ) );
You can’t perform that action at this time.
0 commit comments