Skip to content

Commit c11d155

Browse files
schlesseraclaude
andcommitted
Strip a trailing slash before listing the files of the scenario
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 38a1afe commit c11d155

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎features/testing.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ Feature: Test that WP-CLI loads.
4343
"""
4444
user: admin
4545
"""
46-
And a WP installation in 'scenario-files'
46+
And a WP installation in 'scenario-files/'
4747
Then the scenario-files/wp-cli.yml file should exist
4848

4949
When I run `php -r "rename('scenario-files', 'first');"`
5050

5151
# Reuse the subdirectory to select the same installation cache.
52-
Given a WP installation in 'scenario-files'
52+
Given a WP installation in 'scenario-files/'
5353
Then the scenario-files/wp-config.php file should exist
5454
And the scenario-files/wp-cli.yml file should not exist
5555

‎src/Context/FeatureContext.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,7 @@ private static function log_run_times_after_scenario( $scope ): void {
22562256
* their contents. Empty if the directory does not exist.
22572257
*/
22582258
private static function list_dir( $dir ): array {
2259+
$dir = rtrim( $dir, '/\\' );
22592260
if ( ! is_dir( $dir ) ) {
22602261
return [];
22612262
}

0 commit comments

Comments
 (0)