fix: dms chroma hang on print

This commit is contained in:
purian23 committed 2026-01-21 22:47:53 -05:00
1 parent b819306ab6
commit 6bf1438ef1
1 file changed
+6
+6
View File
@@ -185,6 +185,12 @@ func runChroma(cmd *cobra.Command, args []string) {
}
source = string(content)
} else {
stat, _ := os.Stdin.Stat()
if (stat.Mode() & os.ModeCharDevice) != 0 {
_ = cmd.Help()
os.Exit(0)
}
content, err := io.ReadAll(os.Stdin)
if err != nil {
fmt.Fprintf(os.Stderr, "Error reading stdin: %v\n", err)