wp-env: Add --quiet option to destroy command#68787
wp-env: Add --quiet option to destroy command#68787jrmd wants to merge 5 commits intoWordPress:trunkfrom
Conversation
This patch adds support for `wp-env destroy --skip-confirmation` which allows for the command to be ran without the blocking confirmation prompt. Which easily allows this to be ran within scripts and on CI.
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jrmd! 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. |
|
I like this @jrmd, thank you! Before I test the PR out though, how would you feel about sticking to a more standard option like |
|
@ObliviousHarmony definitely seems sensible to me :) i will make the necessary changes and update the pr :) |
This patch changes the skip-confirmation option for wp-env destroy to `--quiet` which also silences any non-error output along with auto confirming options. This change required a change in the withSpinner HOC due to the .succeed at the end outputting the confirmation message but it does help us in future to implement something for other commands
|
@ObliviousHarmony Updated the pr to use the --quiet/-q 😄 let me know if you have any questions or issues. |
ora itself returns an instance, with the addition of `--quiet` spinner is no longer assigned to `spinner.start()` this mock has been updated to return an instance to itself.
What?
This patch adds support for
wp-env destroy --quietwhich allows for the command to be ran silently and without the blocking confirmation prompt.Why?
I am currently creating a script to run e2e tests across numerous plugins/repos all with their own individual e2e tests set up that need to be ran independently, when trying to run
wp-env destroywithin the script it requires a confirmation from stdin, forcing me to to write to stdin in a rather clunky way. By adding the skip confirmation option allows us to bypass this limitation allows the script to cleanup without issue.How?
PR adds an optional argument to the destroy command which is used to silence all non-error output and skip blocking confirmation prompts. This patch lays some of the necessary foundation to implement across other commands too.
Testing Instructions
wp-env destroy --quietwp-env destroy