Compare commits

..

1 Commits

Author SHA1 Message Date
fiatjaf
53cb2c0490 event: fix handling of -k and kind in stdin event, and default to 1. 2023-11-24 21:08:13 -03:00

View File

@@ -148,11 +148,13 @@ example:
}
kindWasSupplied = strings.Contains(stdinEvent, `"kind"`)
}
kindWasSupplied = slices.Contains(c.FlagNames(), "kind")
if kind := c.Int("kind"); kindWasSupplied {
if kind := c.Int("kind"); slices.Contains(c.FlagNames(), "kind") {
evt.Kind = kind
mustRehashAndResign = true
} else if !kindWasSupplied {
evt.Kind = 1
mustRehashAndResign = true
}
if content := c.String("content"); content != "" {