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

wrangler tail tty-awareness and json-respecting #810

Merged
merged 3 commits into from
Apr 15, 2022
Merged

Conversation

caass
Copy link
Contributor

@caass caass commented Apr 15, 2022

Make wrangler tail TTY-aware, and stop printing non-JSON in JSON mode

Closes #493

2 quick fixes:

  • Check process.stdout.isTTY at runtime to determine whether to default to "pretty" or "json" output for tailing.
  • Only print messages like "Connected to {worker}" if in "pretty" mode (errors still throw strings)

Cass Fridkin added 2 commits April 15, 2022 10:16
Closes #493

2 quick fixes:

- Check `process.stdout.isTTY` at runtime to determine whether to default to "pretty" or "json" output for tailing.
- Only print messages like "Connected to {worker}" if in "pretty" mode (errors still throw strings)
@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2022

🦋 Changeset detected

Latest commit: 538274e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Apr 15, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2174054081/npm-package-wrangler-810

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/810/npm-package-wrangler-810

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2174054081/npm-package-wrangler-810 dev path/to/script.js

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

🍞🥖🥐🥯🥨🥪🫓

@threepointone
Copy link
Contributor

well, after the tests pass ofc

@caass
Copy link
Contributor Author

caass commented Apr 15, 2022

well, after the tests pass ofc

aurghhhh they pass on my machine wtf

@threepointone
Copy link
Contributor

CI is not a TTY, maybe that's it?

@caass caass merged commit 0ce47a5 into main Apr 15, 2022
@caass caass deleted the wrangler-tail-non-tty branch April 15, 2022 19:27
@github-actions github-actions bot mentioned this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: wrangler tail non-TTY behaviour
2 participants