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

fix: log playwright browser download progress on stderr #682

Merged
merged 1 commit into from
Sep 10, 2024

Commits on Sep 10, 2024

  1. fix: log playwright browser download progress on stderr

    If a browser is downloaded during a test run, playwright will log
    on stdout.
    
    This can interfere with the calling code if it's trying to parse
    the output of the program as, for example, JSON.
    
    The fix is to temporarily replace `console.log` with `console.error`
    as that's what the [logPolitely](https://github.com/microsoft/playwright/blob/718bd9b35fd206245401a9ecb320289f427592d9/packages/playwright-core/src/server/registry/browserFetcher.ts#L120)
    function uses to give feedback to the user.
    
    The intention of the playwright maintainers is [not for this
    functionality to be used during a test run](microsoft/playwright#32487 (comment))
    so it's unlikely to move to stderr otherwise.
    achingbrain committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    a95668f View commit details
    Browse the repository at this point in the history