Skip to content

Commit

Permalink
fix template path in phar installs
Browse files Browse the repository at this point in the history
Related wp-cli#4689
  • Loading branch information
wojsmol committed Mar 15, 2024
1 parent 9aec20f commit dcaa940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ function run_mysql_command( $cmd, $assoc_args, $_ = null, $send_to_shell = true,
*/
function mustache_render( $template_name, $data = [] ) {
if ( ! file_exists( $template_name ) ) {
$template_name = WP_CLI_ROOT . "/templates/$template_name";
$template_name = phar_safe_path( WP_CLI_ROOT . "/templates/$template_name" );
}

$template = file_get_contents( $template_name );
Expand Down

0 comments on commit dcaa940

Please sign in to comment.