Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite: fix wp-config.php creation #187

Merged
merged 13 commits into from
Oct 23, 2023
Merged

SQLite: fix wp-config.php creation #187

merged 13 commits into from
Oct 23, 2023

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
@@ -1012,10 +1014,11 @@ public function install_wp( $subdir = '' ) {
'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
@schlessera schlessera added this to the 4.2.1 milestone Oct 23, 2023
@schlessera schlessera merged commit b452014 into main Oct 23, 2023
41 checks passed
@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.

None yet

3 participants