Skip to content

Commit 196eba3

Browse files
committed
Restore warning
1 parent 630f947 commit 196eba3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Context/FeatureContext.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,13 @@ private static function get_process_env_variables(): array {
437437

438438
wp_cli_behat_env_debug( "WP-CLI binary path: {$bin_path}" );
439439

440+
$bin = Utils\is_windows() ? 'wp.bat' : 'wp';
441+
$full_bin_path = $bin_path . DIRECTORY_SEPARATOR . $bin;
442+
443+
if ( ! is_executable( $full_bin_path ) ) {
444+
wp_cli_behat_env_debug( "WARNING: File named '{$bin}' found in the provided/detected binary path is not executable." );
445+
}
446+
440447
$path_separator = Utils\is_windows() ? ';' : ':';
441448
$php_binary_path = dirname( PHP_BINARY );
442449
$env = [
@@ -1232,8 +1239,6 @@ public function proc( $command, $assoc_args = [], $path = '' ): Process {
12321239
$cwd = null;
12331240
}
12341241

1235-
wp_cli_behat_env_debug( "Running command: {$command}" );
1236-
12371242
return Process::create( $command, $cwd, $env );
12381243
}
12391244

0 commit comments

Comments
 (0)