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

mappings configuration incompatible/breaks on default WP installs for wp-env #29929

Closed
nerrad opened this issue Mar 17, 2021 · 4 comments
Closed
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended

Comments

@nerrad
Copy link
Contributor

nerrad commented Mar 17, 2021

Description

I noticed after updating the wp-env package locally that if my .wp-env.json file has a mappings property defined with no core property (or explicitly setting core to null), that executing wp-env start (installed as a package) results in the following error:

No container found for wordpress_1

I'm not sure of the cause yet but I'm guessing that it's a race condition where the container isn't ready for any mapped files/directories to be set.

As a temporary workaround, explicitly defining the WordPress version to use on the core property works fine with mappings.

Step-by-step reproduction instructions

Define a custom .wp-env.json file with something like this.

{
    "core": null,
    "mappings": { "filename.txt": "some/actual_local_file.txt" }
}

Execute the equivalent wp-env start for the environment installed as a local package (likely reproduces installed globally as well).

Device information

  • Device: Desktop
  • Operating system: MacOS Big Sur
  • Browser: n/a
@nerrad nerrad added [Tool] Env /packages/env [Type] Bug An existing feature does not function as intended labels Mar 17, 2021
@nerrad
Copy link
Contributor Author

nerrad commented Mar 17, 2021

Could be related to #29814

@noahtallen
Copy link
Member

noahtallen commented Apr 8, 2021

@nerrad can you test to see if #30053 fixes your issue? I'm unfortunately unable to reproduce :/

Edit: now that #30053 has been merged, it'd be worth testing with trunk.

@nerrad
Copy link
Contributor Author

nerrad commented Apr 9, 2021

Yeah I'll try to do this sometime today or over the weekend and let you know.

@nerrad
Copy link
Contributor Author

nerrad commented Apr 18, 2021

Sorry for the delay, it looks like this fixed this issue 👏

@nerrad nerrad closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants