We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ec2432 + 9523b54 commit d180ea7Copy full SHA for d180ea7
src/Server_Command.php
@@ -76,13 +76,10 @@ function __invoke( $_, $assoc_args ) {
76
}
77
78
// Get the path to the router file
79
- $router_path = WP_CLI_ROOT . '/vendor/wp-cli/server-command/router.php';
+ $command_root = WP_CLI\Utils\phar_safe_path( dirname( __DIR__ ) );
80
+ $router_path = $command_root . '/router.php';
81
if ( ! file_exists( $router_path ) ) {
- // server command must've been built with vendor/wp-cli/wp-cli
82
- $router_path = WP_CLI_ROOT . '/../../../router.php';
83
- if ( ! file_exists( $router_path ) ) {
84
- WP_CLI::error( "Couldn't find router.php" );
85
- }
+ WP_CLI::error( "Couldn't find router.php" );
86
87
$cmd = \WP_CLI\Utils\esc_cmd( '%s -S %s -t %s -c %s %s',
88
WP_CLI::get_php_binary(),
0 commit comments