Skip to content

ansi color panic on Windows when using busybox sh #752

Open

Description

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/ansicolor@v0.0.0-20230509054315-a9deabde6e02/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/logrus@v1.9.3/hooks.go:28 +0x64
github.com/sirupsen/logrus.(*Entry).fireHooks(0xc0003aa150)
        github.com/sirupsen/logrus@v1.9.3/entry.go:280 +0x1fa
github.com/sirupsen/logrus.(*Entry).log(0xc0003aa000, 0x4, {0xc000a8ea40, 0x31})
        github.com/sirupsen/logrus@v1.9.3/entry.go:242 +0x399
github.com/sirupsen/logrus.(*Entry).Log(0xc0003aa000, 0x4, {0xc000947c18?, 0x2?, 0x2?})
        github.com/sirupsen/logrus@v1.9.3/entry.go:304 +0x48
github.com/sirupsen/logrus.(*Entry).Logf(0xc0003aa000, 0x4, {0xd30780?, 0x12?}, {0xc000947dd8?, 0x5?, 0xc00090e480?})
        github.com/sirupsen/logrus@v1.9.3/entry.go:349 +0x7c
github.com/sirupsen/logrus.(*Logger).Logf(0x1502e80, 0x4, {0xd30780, 0x16}, {0xc000947dd8, 0x2, 0x2})
        github.com/sirupsen/logrus@v1.9.3/logger.go:154 +0x7c
github.com/sirupsen/logrus.(*Logger).Infof(...)
        github.com/sirupsen/logrus@v1.9.3/logger.go:168
github.com/sirupsen/logrus.Infof(...)
        github.com/sirupsen/logrus@v1.9.3/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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions