• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

muesli / termenv / 5694303814
58%
master: 50%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 28 Jul 2023 04:47PM UTC
Jobs 1
Files 12
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2023 04:40PM UTC coverage: 58.182% (+0.3%) from 57.843%
5694303814

Pull #146

github

aymanbagabas
fix!: output race condition

BREAKING!

`ColorProfile` reads the terminal environment every time the function is
called. This is inefficient. We only need to read the `$TERM`
environment variable once when we initialize the output. So we cache
the value we read.

Rename `ColorProfile` to `termColorProfile` and rely on
`EnvColorProfile` to detect the profile. Ideally, we rely on the
terminal Terminfo to detect the profile and fallback to the environment.

Make output profile accessible through `ColorProfile`.
Use `SetColorProfile` to change the output color profile.
Use a mutex to guard output writes.
Use pointer receiver since we have a lock in the struct

Fixes: https://github.com/charmbracelet/lipgloss/pull/210
Fixes: https://github.com/muesli/termenv/issues/145
Pull Request #146: fix!: output race condition

77 of 77 new or added lines in 6 files covered. (100.0%)

544 of 935 relevant lines covered (58.18%)

18.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
50.59
0.0% screen.go
2
92.68
0.0% templatehelper.go
3
73.47
-4.79% termenv.go
3
8.16
0.0% termenv_unix.go
4
79.28
1.96% output.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.68
0.0% templatehelper.go
2
79.28
1.96% output.go
Jobs
ID Job ID Ran Files Coverage
1 5694303814.1 28 Jul 2023 04:47PM UTC 12
58.18
GitHub Action Run
Source Files on build 5694303814
  • Tree
  • List 12
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #146
  • PR Base - master (#5627559678)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc