feat: NO_COLOR env to not use ansi colors in miro

This commit is contained in:
2026-03-21 06:48:23 +00:00
parent 7b61da612a
commit b3fc15d3ae
4 changed files with 71 additions and 8 deletions
+2 -3
View File
@@ -7,8 +7,6 @@ import (
"path/filepath"
"strings"
"testing"
"miro/internal/output"
)
func TestRunShowsHelpWhenNoArgs(t *testing.T) {
@@ -551,6 +549,7 @@ func TestRunUnknownCommand(t *testing.T) {
func captureOutput(t *testing.T, fn func()) (string, string) {
t.Helper()
t.Setenv("NO_COLOR", "1")
stdoutReader, stdoutWriter, err := os.Pipe()
if err != nil {
@@ -593,7 +592,7 @@ func captureOutput(t *testing.T, fn func()) (string, string) {
}
func prefixed(msg string) string {
return output.Format(msg)
return "miro " + msg
}
func writeFile(t *testing.T, path, content string) {