Don't participate in elections with fewer than two voters
1 files changed, 5 insertions(+), 1 deletions(-) M cmd/tallyard/main.go
M cmd/tallyard/main.go => cmd/tallyard/main.go +5 -1
@@ 95,10 95,14 @@ func main() { if err != nil { panic(err) } if el.StartID == nil { if el.StartID == nil || el.FinalJoinIDs == nil { // election never started; user likely hit C-c return } if len(*el.FinalJoinIDs) < 2 { fmt.Println("election has fewer than 2 voters; exiting") return } // vote if we need to (user may have voted in previous tallyard // invocation)