Browse Source

allow creation of fresh children db on init

master
Stephen McQuay 4 years ago
parent
commit
82def358d5
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      cmd/allowances/main.go

+ 3
- 5
cmd/allowances/main.go View File

@@ -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
}

Loading…
Cancel
Save