Skip to content

Commit 31b2dc3

Browse files
author
Raphaël Droz
committed
fix behat the right way
1 parent 82772d9 commit 31b2dc3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/flags.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ Feature: Global flags
355355
"""
356356

357357
Scenario: SSH flag should support Docker
358-
When I try `wp --debug --ssh=docker:user@wordpress --version`
358+
When I try `WP_CLI_DOCKER_NO_INTERACTIVE=1 wp --debug --ssh=docker:user@wordpress --version`
359359
Then STDERR should contain:
360360
"""
361361
Running SSH command: docker exec --user 'user' 'wordpress' sh -c

php/WP_CLI/Runner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ private function generate_ssh_command( $bits, $wp_command ) {
593593
$bits['user'] ? '--user ' . escapeshellarg( $bits['user'] ) . ' ' : '',
594594
$bits['path'] ? '--workdir ' . escapeshellarg( $bits['path'] ) . ' ' : '',
595595
$is_stdout_tty && ! getenv( 'WP_CLI_DOCKER_NO_TTY' ) ? '-t ' : '',
596-
$is_stdin_tty || getenv( 'WP_CLI_DOCKER_NO_INTERACTIVE' ) || getenv( 'BEHAT_RUN' ) ? '' : '-i ',
596+
$is_stdin_tty || getenv( 'WP_CLI_DOCKER_NO_INTERACTIVE' ) ? '' : '-i ',
597597
escapeshellarg( $bits['host'] ),
598598
escapeshellarg( $wp_command )
599599
);
@@ -622,7 +622,7 @@ private function generate_ssh_command( $bits, $wp_command ) {
622622
$bits['user'] ? '--user ' . escapeshellarg( $bits['user'] ) . ' ' : '',
623623
$bits['path'] ? '--workdir ' . escapeshellarg( $bits['path'] ) . ' ' : '',
624624
$is_stdout_tty || getenv( 'WP_CLI_DOCKER_NO_TTY' ) ? '' : '-T ',
625-
$is_stdin_tty || getenv( 'WP_CLI_DOCKER_NO_INTERACTIVE' ) || getenv( 'BEHAT_RUN' ) ? '' : '-i ',
625+
$is_stdin_tty || getenv( 'WP_CLI_DOCKER_NO_INTERACTIVE' ) ? '' : '-i ',
626626
escapeshellarg( $bits['host'] ),
627627
$wp_command
628628
);

0 commit comments

Comments
 (0)