1
0

Return errors when dumping

This commit is contained in:
kolaente
2020-06-20 11:37:51 +02:00
parent fba333866d
commit c12bac0c96
2 changed files with 14 additions and 10 deletions

View File

@ -17,6 +17,7 @@
package cmd
import (
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/modules/dump"
"github.com/spf13/cobra"
"time"
@ -34,6 +35,8 @@ var dumpCmd = &cobra.Command{
},
Run: func(cmd *cobra.Command, args []string) {
filename := "vikunja-dump_" + time.Now().Format("2006-01-02_15-03-05") + ".zip"
dump.Dump(filename)
if err := dump.Dump(filename); err != nil {
log.Critical(err.Error())
}
},
}