-
Notifications
You must be signed in to change notification settings - Fork 67
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
ansi characters when air is used #90
Comments
Run into this issue today also air-verse/air#502 |
I have also had this same issue, but I have 2 things to add:
|
Thanks for the workaround |
Don't use AdaptiveColors and use regular colors instead. This makes the default styles _not_ use HasDarkBackground to determine the terminal background color. HasDarkBackground will query the terminal for the background color using `OSC 11` to determine which color to use in AdaptiveColor. For users who still want to use AdaptiveColors, they can supply their own custom styles. Fixes: #90
…lor (#93) Don't use AdaptiveColors and use regular colors instead. This makes the default styles _not_ use HasDarkBackground to determine the terminal background color. HasDarkBackground will query the terminal for the background color using `OSC 11` to determine which color to use in AdaptiveColor. For users who still want to use AdaptiveColors, they can supply their own custom styles. Fixes: #90
Looks like the issue is still here with latest 0.3.1 release which includes the fix 2023-11-28.09-49-43.mp4package main
import (
"os"
"github.com/charmbracelet/log"
)
func main() {
log.NewWithOptions(os.Stdout, log.Options{})
log.Info("test")
} |
It looks like this is a result of querying the cursor position (CPR) |
Hi! I get the same result of @basaran but only when running the app inside a docker container (compiles in This also slows down the startup/bootstrap of the application. FROM golang:alpine as app-builder
WORKDIR /go/src/app
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,target=. \
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata -o /go/bin/my_app
FROM scratch
COPY --from=app-builder /go/bin/my_app /my_app
COPY .env /.env
COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
HEALTHCHECK NONE
ENTRYPOINT [ "/my_app" ] output of
|
It looks like this was fixed by another package similarly to @aymanbagabas fix in #93 |
This should be handled by 2819330 released in v0.4.0, closing. |
Unfortunately, this does not appear to be fixed with
|
Considering the above ^, should I open a new ticket? |
FWIW a more complete workaround, with the output still having colors, is to set these 2 envs: CI=1
CLICOLOR_FORCE=1 |
Also encountering the same issue in WSL2 and air |
Encounter is in Air with ZSH on kitty terminal more details here |
…lor (#93) Don't use AdaptiveColors and use regular colors instead. This makes the default styles _not_ use HasDarkBackground to determine the terminal background color. HasDarkBackground will query the terminal for the background color using `OSC 11` to determine which color to use in AdaptiveColor. For users who still want to use AdaptiveColors, they can supply their own custom styles. Fixes: charmbracelet/log#90
I see similar junk output running in a container inside of podman.
Setting the two environment variables worked to suppress the junk output.
Running the 0.4.0 release:
|
Hello,
I use air as a live reload tool during development. When the log is used, I get scrambled ansi characters on the terminal (alacritty).
Here's a recording:
https://github.com/charmbracelet/log/assets/30809170/36b68013-a03b-47e5-85aa-5f85f3058d30
Is this an air issue?
The text was updated successfully, but these errors were encountered: