Skip to content

Conversation

@iamarunchaitanyajami
Copy link

Description

Allows users to override the cache directory when WP_ENV_HOME set in .wp-env.json and .wp-env-override.json.

How?

{
  "core": null,
  "plugins": [ "." ],
  "config": {
    "WP_ENV_HOME" : "/PATH/TO/YOUR/DIRECTORY"
  }
}

Testing

  1. I used the WP_ENV_HOME variable locally in my .wp-env.json file and verified generated files were placed there.
  2. I also checked that the default location and Environment Variable is still used if the environment variable is not specified.
  3. I also tested that, if the container is running, the start command works successfully after deleting the wp-env home directory.

Types of changes

New Feature

Checklist:

  • My code is tested
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@github-actions
Copy link

github-actions bot commented May 19, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: iamarunchaitanyajami <[email protected]>
Co-authored-by: ObliviousHarmony <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 19, 2024
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @iamarunchaitanyajami! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@ObliviousHarmony
Copy link
Contributor

Thanks for this contribution @iamarunchaitanyajami!

Unfortunately, I don't think we should do this.

  1. The config section only contains values for the wp-config.php file. Adding values to be consumed by wp-env itself could lead to conflicts.
  2. WP_ENV_HOME allows users to change the cache directory on their own machine. These paths are specific to the filesystem and having them in a shared space like .wp-env.json seems like an accident waiting to happen.

Out of curiosity, could you share some context around your use-case for this feature?

@ObliviousHarmony
Copy link
Contributor

Hi @iamarunchaitanyajami,

I am going to go ahead and close this pull request as it hasn't had any activity for quite some time. Please feel free to follow-up if you'd like to discuss my comments above!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants