aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/undo.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 22:32:00 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 22:32:00 +0200
commit8227de6a887c8600746b06d1287cb2b00de77e28 (patch)
treed3370476344ee22c699270457d05c846453ad0d7 /cmd/krino/undo.go
parenta91b713dcec4d17f76155f0cd6b26903c59b9c19 (diff)
downloadkrino-8227de6a887c8600746b06d1287cb2b00de77e28.tar.gz
krino-8227de6a887c8600746b06d1287cb2b00de77e28.zip
plan 10: commands refuse global flags they do not use
Diffstat (limited to 'cmd/krino/undo.go')
-rw-r--r--cmd/krino/undo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/krino/undo.go b/cmd/krino/undo.go
index 4cefc82..1b5e6ae 100644
--- a/cmd/krino/undo.go
+++ b/cmd/krino/undo.go
@@ -50,6 +50,9 @@ func cmdUndo(g *globals, args []string, stdout, stderr io.Writer) int {
if g.minAgeSet {
return usageError(stderr, "--min-age applies only to sorting and explain")
}
+ if code, refused := refuseUnusedFlags(g, stderr, "undo", true); refused {
+ return code
+ }
if g.yes && g.dry {
return usageError(stderr, "-y and -n cannot be used together")
}