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

Add wp-env Post-Install Command #49996

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Added Post-Install Debug Variable
  • Loading branch information
ObliviousHarmony committed Apr 21, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 9234d22a30a082630642439d7f6b5f47817a730d
1 change: 1 addition & 0 deletions packages/env/README.md
Original file line number Diff line number Diff line change
@@ -696,6 +696,7 @@ Additional environment variables are given to the command to provide context abo

- `WP_ENV_POST_INSTALL_CONTEXT` contains the command that triggered the execution, either `start` or `clean`.
- `WP_ENV_POST_INSTALL_ENVIRONMENT` contains the environment that the command is being executed for, such as `development` or `tests`.
ObliviousHarmony marked this conversation as resolved.
Show resolved Hide resolved
- `WP_ENV_POST_INSTALL_DEBUG` contains a boolean indicating whether or not `wp-env` is in debug mode.

## Contributing to this package

1 change: 1 addition & 0 deletions packages/env/lib/wordpress.js
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ async function configureWordPress(
...process.env,
WP_ENV_POST_INSTALL_CONTEXT: postInstallContext,
WP_ENV_POST_INSTALL_ENVIRONMENT: environment,
WP_ENV_POST_INSTALL_DEBUG: config.debug,
},
} );
} catch ( e ) {