feat: warn user about chafa

This commit is contained in:
nekohepott 2026-06-17 04:16:35 +03:00
parent fa5f941418
commit fb397912e4
No known key found for this signature in database

View File

@ -129,15 +129,13 @@ func main() {
}
fallbackToAscii := func(path *string) []string {
fmt.Println("chafa binary not found, chafa is the dependency of gogofetch, please install it")
parts := strings.Split(*path, ".")
if len(parts) > 1 {
parts[len(parts)-1] = "txt"
}
*path = strings.Join(parts, ".")
if !strings.HasSuffix(*path, ".txt") {
fmt.Println("chafa binary not found, to print images please install chafa")
}
return providers.SplitLines(providers.PrintAsciiLogo(*path))
}