Skip to content

Commit d7ca713

Browse files
committed
Add back fix without patch, add tests
1 parent 80fd8e3 commit d7ca713

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

features/bootstrap.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,17 @@ Feature: Bootstrap WP-CLI
8181
Status: Inactive
8282
"""
8383
And STDERR should be empty
84+
85+
Scenario: Mustache templates should be resolved correctly when PHAR is renamed without extension
86+
87+
Given an empty directory
88+
And a new Phar with the same version
89+
And I run `php {PHAR_PATH} core download`
90+
91+
When I run `cp {PHAR_PATH} wp-renamed`
92+
And I run `php wp-renamed config create --dbname=wordpress --dbuser=user --dbpass=pass --skip-check`
93+
Then STDOUT should contain:
94+
"""
95+
Success: Generated 'wp-config.php' file.
96+
"""
97+
And STDERR should be empty

php/boot-phar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
// Store the path to the Phar early on for `Utils\phar-safe-path()` function.
13-
define( 'WP_CLI_PHAR_PATH', Phar::running( true ) );
13+
define( 'WP_CLI_PHAR_PATH', Phar::running( false ) );
1414

1515
if ( file_exists( 'phar://wp-cli.phar/php/wp-cli.php' ) ) {
1616
define( 'WP_CLI_ROOT', 'phar://wp-cli.phar' );

0 commit comments

Comments
 (0)