Restore confirmation to delete -r, lost in botched merge

This commit is contained in:
Alan Donovan 2021-09-17 09:45:49 -04:00
parent 6ac8a0ad88
commit 747d7e7173

View file

@ -162,6 +162,19 @@ func deleteByRepo(log *output.Logger, repo string, force bool) error {
if !strings.EqualFold(c.RepositoryNWO, repo) {
continue
}
confirmed, err := confirmDeletion(c, force)
if err != nil {
mu.Lock()
errs = append(errs, fmt.Errorf("deletion could not be confirmed: %w", err))
mu.Unlock()
continue
}
if !confirmed {
continue
}
found = true
c := c
wg.Add(1)