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

wp-env: Ensure the environment is used with the logs command. #27907

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

pablinos
Copy link
Member

Description

While I was debugging something I noticed I was working with the test
environment rather than the main development one. I realised I couldn't
switch to tailing the logs of the test environment, and it was because
the optional parameter wasn't being passed to the command.

This change fixes that, by adding the optional parameter to the command
definition.

How has this been tested?

Using the command: npm run wp-env logs tests

Without this change the main wordpress environment logs are still shown, but with it, you can see the logs for the tests environment.

Types of changes

Bug fix.

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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

While I was debugging something I noticed I was working with the test
environment rather than the main development one. I realised I couldn't
switch to tailing the logs of the test environment, and it was because
the optional parameter wasn't being passed to the command.

This change fixes that, by adding the optional parameter to the command
definition.
@pablinos pablinos requested a review from noahtallen as a code owner December 28, 2020 06:28
@youknowriad youknowriad requested a review from gziolo December 30, 2020 14:12
@youknowriad youknowriad added the [Type] Build Tooling Issues or PRs related to build tooling label Dec 30, 2020
Copy link
Member

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm! Thanks for the fix. The behavior now is:

  • wp-env logs (or wp-env logs development) shows logs for only the development instance
  • wp-env logs all shows logs for dev and tests
  • wp-env logs tests shows logs for only the tests instnace

@noahtallen noahtallen merged commit f7d0f5d into WordPress:master Jan 5, 2021
@github-actions github-actions bot added this to the Gutenberg 9.8 milestone Jan 5, 2021
@noahtallen noahtallen added the [Tool] Env /packages/env label Jan 5, 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] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants