Remove duplicate plugin mount from wp-env config#101
Merged
Conversation
The plugins array contained "." which caused wp-env to mount the workspace directory as a plugin, duplicating the explicit mapping in the mappings section. This could cause conflicts when the workspace directory differs from the project root.
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the implicit “mount current directory as a plugin” behavior from wp-env by clearing the plugins list, so the plugin is only mounted via the explicit mappings entry (wp-content/plugins/press-this).
Changes:
- Removed
"."from thepluginsarray to prevent a second plugin mount under the workspace directory name. - Leaves the plugin mounted solely through
mappingsto ensure WordPress sees onlypress-this.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
With the plugins array empty, the mapping alone places files but does not activate the plugin. Add an afterStart lifecycle script to activate press-this automatically on every wp-env start.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"."from thepluginsarray in.wp-env.jsonto eliminate a duplicate plugin mountmappingssection already mounts the project aswp-content/plugins/press-this, so thepluginsentry caused wp-env to mount it a second time under the workspace directory name (e.g.bamako)wp plugin listshowed two entries: the workspace-named one (active) andpress-this(inactive) — meaning the plugin ran under the wrong directory nameTest plan
wp-env startsucceedswp plugin listshows onlypress-this(no duplicate under workspace dir name)