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

ansi color panic on Windows when using busybox sh #752

Open
doctorpangloss opened this issue Aug 12, 2024 · 1 comment
Open

ansi color panic on Windows when using busybox sh #752

doctorpangloss opened this issue Aug 12, 2024 · 1 comment

Comments

@doctorpangloss
Copy link

INFO ==> Running phase: Download k0s on hosts
[36mINFO[36mINFOpanic: runtime error: slice bounds out of range [1:0]

goroutine 655 [running]:
github.com/shiena/ansicolor.(*ansiColorWriter).Write(0xc0003dc2a0, {0xc00019f180, 0x41, 0x80})
        github.com/shiena/[email protected]/ansicolor_windows.go:385 +0x45b
github.com/k0sproject/k0sctl/cmd.(*loghook).Fire(0xc0003b0cc0, 0xc000947a18?)
        github.com/k0sproject/k0sctl/cmd/flags.go:374 +0xb3
github.com/sirupsen/logrus.LevelHooks.Fire(0xc000947a58?, 0x947a18?, 0xc0003aa150)
        github.com/sirupsen/[email protected]/hooks.go:28 +0x64
github.com/sirupsen/logrus.(*Entry).fireHooks(0xc0003aa150)
        github.com/sirupsen/[email protected]/entry.go:280 +0x1fa
github.com/sirupsen/logrus.(*Entry).log(0xc0003aa000, 0x4, {0xc000a8ea40, 0x31})
        github.com/sirupsen/[email protected]/entry.go:242 +0x399
github.com/sirupsen/logrus.(*Entry).Log(0xc0003aa000, 0x4, {0xc000947c18?, 0x2?, 0x2?})
        github.com/sirupsen/[email protected]/entry.go:304 +0x48
github.com/sirupsen/logrus.(*Entry).Logf(0xc0003aa000, 0x4, {0xd30780?, 0x12?}, {0xc000947dd8?, 0x5?, 0xc00090e480?})
        github.com/sirupsen/[email protected]/entry.go:349 +0x7c
github.com/sirupsen/logrus.(*Logger).Logf(0x1502e80, 0x4, {0xd30780, 0x16}, {0xc000947dd8, 0x2, 0x2})
        github.com/sirupsen/[email protected]/logger.go:154 +0x7c
github.com/sirupsen/logrus.(*Logger).Infof(...)
        github.com/sirupsen/[email protected]/logger.go:168
github.com/sirupsen/logrus.Infof(...)
        github.com/sirupsen/[email protected]/exported.go:199
github.com/k0sproject/k0sctl/phase.(*DownloadK0s).downloadK0s(0xc0000c6370, 0xc0001ceb48)
        github.com/k0sproject/k0sctl/phase/download_k0s.go:65 +0x174
github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster.Hosts.ParallelEach.func1(0xc0001ceb48)
        github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/hosts.go:124 +0x91
created by github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster.Hosts.ParallelEach in goroutine 1
        github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/hosts.go:122 +0x1bb

is there a way to easily disable console coloring?

@doctorpangloss
Copy link
Author

related to rmyorston/busybox-w32#287

BB_SKIP_ANSI_EMULATION=0 ./k0sctl.exe ... resolves the issue

it's from interacting with ssh. but generally I think less coloring and various amenities, the better

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

No branches or pull requests

1 participant