Skip to content
Closed
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
14 changes: 14 additions & 0 deletions features/command.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1676,3 +1676,17 @@ Feature: WP-CLI Commands
"""
core custom-subcommand
"""

Scenario: Templates should still be found when WP CLI phar is renamed
Given a WP installation
And these installed and active plugins:
"""
akismet
"""
And a new Phar with the same version

When I run `wp plugin status akismet`
Then STDOUT should contain:
"""
Plugin akismet details:
"""
1 change: 1 addition & 0 deletions php/boot-phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// Store the path to the Phar early on for `Utils\phar-safe-path()` function.
define( 'WP_CLI_PHAR_PATH', getcwd() );
define( 'WP_CLI_PHAR_HOST_FILENAME', basename( dirname( __DIR__ ) ) );

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