Skip to content

Commit f77d43b

Browse files
authored
Setup & teardown hardening (#320)
* Harden cleanup on CI to avoid filesystem bottlenecks * Set `WP_CLI_SKIP_PROMPT` by default in tests
1 parent df637ac commit f77d43b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Context/FeatureContext.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,12 @@ private static function get_process_env_variables(): array {
450450
$path_separator = Utils\is_windows() ? ';' : ':';
451451
$php_binary_path = dirname( PHP_BINARY );
452452
$env = [
453-
'PATH' => $php_binary_path . $path_separator . $bin_path . $path_separator . getenv( 'PATH' ),
454-
'BEHAT_RUN' => 1,
455-
'HOME' => sys_get_temp_dir() . '/wp-cli-home',
456-
'COMPOSER_HOME' => sys_get_temp_dir() . '/wp-cli-composer-home',
457-
'TEST_RUN_DIR' => self::$behat_run_dir,
453+
'PATH' => $php_binary_path . $path_separator . $bin_path . $path_separator . getenv( 'PATH' ),
454+
'BEHAT_RUN' => 1,
455+
'HOME' => sys_get_temp_dir() . '/wp-cli-home',
456+
'COMPOSER_HOME' => sys_get_temp_dir() . '/wp-cli-composer-home',
457+
'TEST_RUN_DIR' => self::$behat_run_dir,
458+
'WP_CLI_SKIP_PROMPT' => 'no',
458459
];
459460

460461
$env = array_merge( $_ENV, $env );

0 commit comments

Comments
 (0)