aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/check.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 22:31:12 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 22:31:12 +0200
commita91b713dcec4d17f76155f0cd6b26903c59b9c19 (patch)
tree44b1354e152c71a978738ee6ec47164ccef10b81 /cmd/krino/check.go
parentc03a72f1d7b598c1fe8fd01bb1f5bbfbd0256313 (diff)
downloadkrino-a91b713dcec4d17f76155f0cd6b26903c59b9c19.tar.gz
krino-a91b713dcec4d17f76155f0cd6b26903c59b9c19.zip
plan 10: stderr messages cannot be split by quoted newlines; config paths escaped; krino new refuses control characters; independent terminal oracle
Diffstat (limited to 'cmd/krino/check.go')
-rw-r--r--cmd/krino/check.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/krino/check.go b/cmd/krino/check.go
index 97c1f16..d4aee01 100644
--- a/cmd/krino/check.go
+++ b/cmd/krino/check.go
@@ -29,25 +29,25 @@ func cmdCheck(g *globals, args []string, stdout, stderr io.Writer) int {
}
r := e.Check()
- fmt.Fprintf(stdout, "config: %s\n", xdg.Abbrev(r.MainFile))
- fmt.Fprintf(stdout, "log: %s\n", xdg.Abbrev(r.LogFile))
- fmt.Fprintf(stdout, "cache: %s\n", xdg.Abbrev(cacheDir()))
+ fmt.Fprintf(stdout, "config: %s\n", display(xdg.Abbrev(r.MainFile)))
+ fmt.Fprintf(stdout, "log: %s\n", display(xdg.Abbrev(r.LogFile)))
+ fmt.Fprintf(stdout, "cache: %s\n", display(xdg.Abbrev(cacheDir())))
if len(r.Dirs) == 0 {
fmt.Fprintln(stdout, "no directories included; add one with: krino new NAME PATH")
}
for _, dr := range r.Dirs {
- fmt.Fprintf(stdout, "\n%s %s\n", dr.Dir.Name, xdg.Abbrev(dr.Dir.Root))
+ fmt.Fprintf(stdout, "\n%s %s\n", display(dr.Dir.Name), display(xdg.Abbrev(dr.Dir.Root)))
if dr.Missing {
- fmt.Fprintf(stdout, " warning: %s is not a directory right now; it will be skipped\n", xdg.Abbrev(dr.Dir.Root))
+ fmt.Fprintf(stdout, " warning: %s is not a directory right now; it will be skipped\n", display(xdg.Abbrev(dr.Dir.Root)))
}
for _, x := range dr.Dir.Excludes {
- fmt.Fprintf(stdout, " %s\n", x.Text)
+ fmt.Fprintf(stdout, " %s\n", display(x.Text))
}
if len(dr.Dir.Rules) == 0 {
fmt.Fprintln(stdout, " no rules yet")
}
for i, rule := range dr.Dir.Rules {
- fmt.Fprintf(stdout, " %2d %-16s %s\n", i+1, rule.Name, describeActions(rule.Conf))
+ fmt.Fprintf(stdout, " %2d %-16s %s\n", i+1, display(rule.Name), display(describeActions(rule.Conf)))
}
}