Skip to content

Commit

Permalink
Check for errors on forget after having backuped (cupcakearmy#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain de Laage committed Oct 17, 2022
1 parent 874ed52 commit 3732dcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ after:

// Forget and optionally prune
if isSuccess && l.ForgetOption != "" && l.ForgetOption != LocationForgetNo {
l.Forget(l.ForgetOption == LocationForgetPrune, false)
err := l.Forget(l.ForgetOption == LocationForgetPrune, false)
if err != nil {
errors = append(errors, err)
}
}

if len(errors) == 0 {
Expand Down

0 comments on commit 3732dcf

Please sign in to comment.