Skip to content

Status bar logged to console after completion message #4023

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

Closed
ghost opened this issue Jul 25, 2017 · 4 comments
Closed

Status bar logged to console after completion message #4023

ghost opened this issue Jul 25, 2017 · 4 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jul 25, 2017

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Status bar logged to console after completion message is printed.

If the current behavior is a bug, please provide the steps to reproduce.
Use latest yarn from master for this:

yarn add express

You'll see items being logged after the completion message "Done in Xs" is printed. I think it's related to commit 61e402b where process.exit() was changed out for process.exitCode;

screenshot

What is the expected behavior?
Completion message is the final thing printed.

Please mention your node.js, yarn and operating system version.
Node.js v6.11.0 / Yarn latest commit

@BYK
Copy link
Member

BYK commented Aug 2, 2017

Can this be the solution: #4067

@BYK BYK self-assigned this Aug 2, 2017
@ghost
Copy link
Author

ghost commented Aug 2, 2017

Just tried with the latest commit from master and it's still showing the additional output.

@BYK
Copy link
Member

BYK commented Aug 2, 2017

Alright, will check again tomorrow and see if I can repro.

@BYK
Copy link
Member

BYK commented Aug 3, 2017

@aracarie - Looks like this was an existing issue, masked by the previously used process.exit() which cut the output before it can be completed. I'm working on a fix. Thanks for bringing this up!

BYK pushed a commit that referenced this issue Aug 3, 2017
**Summary**

Fixes #4023. There was nothing preventing the console reporter from
having more than one progress bars, or keep updating and rendering
its progress bar after it was finished or the reporter was "done".

This patch stores the active progress bar, and stops it before
`footer` is printed out. Also makes sure the progress bar itself
ignores any updates once it stops.

**Test plan**

One, weak, existing test with updated snapshot. Manual steps:

- Run `yarn install express`
- Observe that your console is properly cleared after `yarn`
  finishes and the last thing you see is the "Done in X.YZs."
  message and not a corrupted progress bar.
@BYK BYK closed this as completed in #4084 Aug 4, 2017
BYK added a commit that referenced this issue Aug 4, 2017
**Summary**

Fixes #4023. There was nothing preventing the console reporter from
having more than one progress bars, or keep updating and rendering
its progress bar after it was finished or the reporter was "done".

This patch stores the active progress bar, and stops it before
`footer` is printed out. Also makes sure the progress bar itself
ignores any updates once it stops.

**Test plan**

One, weak, existing test with updated snapshot. Manual steps:

- Run `yarn install express`
- Observe that your console is properly cleared after `yarn`
  finishes and the last thing you see is the "Done in X.YZs."
  message and not a corrupted progress bar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant