From 82def358d575cb1343b8741c5859e924dc1cc651 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 9 Aug 2015 16:28:40 -0700 Subject: [PATCH] allow creation of fresh children db on init --- cmd/allowances/main.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/allowances/main.go b/cmd/allowances/main.go index 6462412..d87172d 100644 --- a/cmd/allowances/main.go +++ b/cmd/allowances/main.go @@ -92,11 +92,9 @@ func main() { case "add": dbfile := os.Args[3] names := os.Args[4:] - db, err := children.Load(dbfile) - if err != nil { - fmt.Fprintf(os.Stderr, "problem loading children db: %s\n", pwUsage) - os.Exit(1) - } + + // ignore if file wasn't there to begin with + db, _ := children.Load(dbfile) for _, name := range names { db[name] = 0 }