diff --git a/example/cmd/modifier_test.go b/example/cmd/modifier_test.go index dbbd8785b..c3dfbd560 100644 --- a/example/cmd/modifier_test.go +++ b/example/cmd/modifier_test.go @@ -1,6 +1,7 @@ package cmd import ( + "os" "testing" "time" @@ -128,6 +129,7 @@ func TestMultiParts(t *testing.T) { } func TestPrefix(t *testing.T) { + os.Unsetenv("LS_COLORS") sandbox.Package(t, "github.com/rsteube/carapace/example")(func(s *sandbox.Sandbox) { s.Files("subdir/file1.txt", "") diff --git a/pkg/sandbox/sandbox.go b/pkg/sandbox/sandbox.go index 21aa6ba23..b78c732b4 100644 --- a/pkg/sandbox/sandbox.go +++ b/pkg/sandbox/sandbox.go @@ -17,10 +17,6 @@ import ( "github.com/spf13/cobra" ) -func init() { - os.Unsetenv("LS_COLORS") -} - type Sandbox struct { t *testing.T cmdF func() *cobra.Command