1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

fix: dms chroma hang on print

This commit is contained in:
purian23
2026-01-21 22:47:53 -05:00
parent b819306ab6
commit 6bf1438ef1

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)