Skip to content

Conversation

@swissspidy
Copy link
Member

@swissspidy swissspidy commented Oct 19, 2023

wp config create by default checks the database connection when trying to create the wp-config.php file, and uses die()when the connection fails. This happens on CI because there is no MySQL server running.

https://github.com/wp-cli/config-command/blob/ca25b73e798657ac1846c99b96d3ae8d22be4f34/src/Config_Command.php#L159-L171

@swissspidy swissspidy changed the title Debug SQLite Fix SQLite testing Oct 19, 2023
@swissspidy swissspidy marked this pull request as ready for review October 19, 2023 15:03
@swissspidy swissspidy requested a review from a team as a code owner October 19, 2023 15:03
'skip-email' => true,
];

$run_dir = '' !== $subdir ? ( $this->variables['RUN_DIR'] . "/$subdir" ) : $this->variables['RUN_DIR'];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved because it's otherwise not always defined

@swissspidy swissspidy changed the title Fix SQLite testing SQLite: fix wp-config.php creation Oct 21, 2023
@swissspidy swissspidy requested a review from schlessera October 23, 2023 09:57
@schlessera schlessera added this to the 4.2.1 milestone Oct 23, 2023
@schlessera schlessera merged commit b452014 into main Oct 23, 2023
@schlessera schlessera deleted the fix/debug-sqlite branch October 23, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants