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

wp-now: Mount db.php file instead of copying it #318

Merged
merged 3 commits into from
May 12, 2023

Conversation

wojtekn
Copy link
Collaborator

@wojtekn wojtekn commented May 12, 2023

In this diff, I propose to mount the db.php file, similarly to the whole plugin directory, instead of copying it to wp-content.

That way we will remove one more change we are currently making in developer's codebase in 'wordpress' and 'wp-content' modes.

Note: mount() still adds an empty directory (https://emscripten.org/docs/api_reference/Filesystem-API.html#FS.mount) but at least such empty directory is not caught by git status in the developer's project.

Related #313

@wojtekn wojtekn changed the title wp-env: Mount db.php file instead of copying it May 12, 2023
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

I verified that wp-now start runs as expected, and a db.php folder is created in the project directory:

$ ls
database   db.php     mu-plugins plugins    themes     uploads
$ cat db.php
cat: db.php: Is a directory

We can add tests with #312

@adamziel
Copy link
Collaborator

TIL you can do that, NICE! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants