mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-02 00:30:40 +00:00
add failure and success hooks
This commit is contained in:
@@ -17,15 +17,15 @@ var backupCmd = &cobra.Command{
|
||||
CheckErr(err)
|
||||
defer lock.Unlock()
|
||||
|
||||
CheckErr(internal.CheckConfig())
|
||||
internal.GetConfig()
|
||||
|
||||
selected, err := internal.GetAllOrSelected(cmd, false)
|
||||
CheckErr(err)
|
||||
errors := 0
|
||||
for _, name := range selected {
|
||||
location, _ := internal.GetLocation(name)
|
||||
err := location.Backup(false)
|
||||
if err != nil {
|
||||
errs := location.Backup(false)
|
||||
for err := range errs {
|
||||
colors.Error.Println(err)
|
||||
errors++
|
||||
}
|
||||
|
Reference in New Issue
Block a user