Skip to content
Draft
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
100 changes: 50 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions features/bootstrap.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,17 @@ Feature: Bootstrap WP-CLI
Status: Inactive
"""
And STDERR should be empty

Scenario: Mustache templates should be resolved correctly when PHAR is renamed without extension

Given an empty directory
And a new Phar with the same version
And I run `php {PHAR_PATH} core download`

When I run `cp {PHAR_PATH} wp-renamed`
And I run `php wp-renamed config create --dbname=wordpress --dbuser=user --dbpass=pass --skip-check`
Then STDOUT should contain:
"""
Success: Generated 'wp-config.php' file.
"""
And STDERR should be empty
2 changes: 1 addition & 1 deletion php/boot-phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

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

if ( file_exists( 'phar://wp-cli.phar/php/wp-cli.php' ) ) {
define( 'WP_CLI_ROOT', 'phar://wp-cli.phar' );
Expand Down
Loading