commit a7b927ecb9678cc86c1354e35b535beef24ba3d1
parent c814b352f94749456bc9d5054a665dd773ed9061
Author: Damian Myrda <damian@prime8.dev>
Date: Wed, 21 Oct 2026 02:49:38 +0000
fix(tui): fall back to plain ascii logo when color is unavailable
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/internal/tui/about_ascii.go b/internal/tui/about_ascii.go
@@ -25,9 +25,15 @@ func loadAboutASCII(width int) string {
aboutASCIIConvertMu.Lock()
defer aboutASCIIConvertMu.Unlock()
- ascii, err := aic.Convert(filepath.Join("static", "me.jpg"), flags)
+ path := filepath.Join("static", "me.jpg")
+ ascii, err := aic.Convert(path, flags)
if err != nil {
- return ""
+ // aic refuses color when the server's terminal env lacks COLORTERM;
+ // fall back to plain ascii so the logo always renders.
+ flags.Colored = false
+ if ascii, err = aic.Convert(path, flags); err != nil {
+ return ""
+ }
}
return strings.TrimRight(ascii, "\n")