Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ export WPT_PHP_EXECUTABLE=${WPT_PHP_EXECUTABLE-php}
export WPT_PHPUNIT_CMD=""

# (Optionally) define the command execution to remove the test directory
# Use if `rm -r` can't be called directly for some reason.
# Use if `rm -rf` can't be called directly for some reason. Include the `-f`
# flag, or removal stops to ask about write-protected files such as git objects.
export WPT_RM_TEST_DIR_CMD=""

# SSH connection string (can also be an alias).
Expand Down Expand Up @@ -358,7 +359,7 @@ export WPT_PHPUNIT_CMD=""

**Remove directory command**

(Optionally) define the command execution to remove the test directory. Use if `rm -r` can't be called directly for some reason.
(Optionally) define the command execution to remove the test directory. Use if `rm -rf` can't be called directly for some reason. Include the `-f` flag, or removal stops to ask about write-protected files such as git objects, and cleanup waits for input that never arrives.

```
export WPT_RM_TEST_DIR_CMD=""
Expand Down
4 changes: 2 additions & 2 deletions cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
* The following actions are performed:
* - Forcefully deletes only the .git directory and the node_modules cache.
* - Forcefully remove the `node_modules/.cache` directory.
* - Remove the entire preparation directory.
* - Forcefully remove the entire preparation directory.
*/
perform_operations(
array(
'rm -rf ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] . '/.git' ),
'rm -rf ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] . '/node_modules/.cache' ),
'rm -r ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ),
'rm -rf ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ),
)
);

Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function setup_runner_env_vars() {
'WPT_SSH_CONNECT' => trim( getenv( 'WPT_SSH_CONNECT' ) ),
'WPT_SSH_OPTIONS' => '' !== $ssh_options ? $ssh_options : '-o StrictHostKeyChecking=no',
'WPT_PHP_EXECUTABLE' => '' !== $php_exec ? $php_exec : 'php',
'WPT_RM_TEST_DIR_CMD' => '' !== $rm_test_dir ? $rm_test_dir : 'rm -r ' . $runner_configuration['WPT_TEST_DIR'],
'WPT_RM_TEST_DIR_CMD' => '' !== $rm_test_dir ? $rm_test_dir : 'rm -rf ' . escapeshellarg( $runner_configuration['WPT_TEST_DIR'] ),
'WPT_REPORT_API_KEY' => trim( getenv( 'WPT_REPORT_API_KEY' ) ),
'WPT_DEBUG' => (bool) getenv( 'WPT_DEBUG' ),
)
Expand Down
Loading