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

feature: add check for whether the output is to a terminal #760

Merged
merged 4 commits into from
Jun 29, 2022

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Jun 29, 2022

Description

A description of the change and what it does. If relevant (such as any change that modifies the UI), please provide screenshots of the change:

Adds a warning if the user is calling bottom from an environment where the output is not a terminal.

image

Testing

If relevant, please state how this was tested. All changes must be tested to work:

Please also indicate which platforms were tested. All platforms directly affected by the change must be tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2022

Codecov Report

Merging #760 (76d4922) into master (2a183c6) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #760      +/-   ##
==========================================
- Coverage   24.20%   24.15%   -0.05%     
==========================================
  Files          57       57              
  Lines       12888    12912      +24     
==========================================
  Hits         3119     3119              
- Misses       9769     9793      +24     
Impacted Files Coverage Δ
src/bin/main.rs 12.84% <0.00%> (-0.45%) ⬇️
src/lib.rs 3.10% <0.00%> (-0.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a183c6...76d4922. Read the comment docs.

@ClementTsang ClementTsang merged commit baf8442 into master Jun 29, 2022
@ClementTsang ClementTsang deleted the check_if_tty branch June 29, 2022 03:00
ClementTsang added a commit that referenced this pull request Jun 29, 2022
Addition to #760, adds an extra message so users know how to exit in this scenario.
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.

2 participants