mirror of
https://github.com/Jguer/yay
synced 2024-10-02 22:33:47 +00:00
fix(clean): notify RemoveAll error when cleaning AUR (#1863)
otherwise if any hard-to-delete file lands in the AUR cache folder, running `yay -Scc` will appear to succeed to the user, but actually abort midway.
This commit is contained in:
parent
9a23b792c4
commit
2bda76e431
5
clean.go
5
clean.go
|
@ -154,9 +154,10 @@ func cleanAUR(ctx context.Context, keepInstalled, keepCurrent, removeAll bool, d
|
|||
}
|
||||
}
|
||||
|
||||
err = os.RemoveAll(filepath.Join(config.BuildDir, file.Name()))
|
||||
dir := filepath.Join(config.BuildDir, file.Name())
|
||||
err = os.RemoveAll(dir)
|
||||
if err != nil {
|
||||
return nil
|
||||
text.Warnln(gotext.Get("Unable to remove %s: %s", dir, err))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue