mirror of
https://github.com/Jguer/yay
synced 2024-10-02 22:33:47 +00:00
fix(cleanafter): do not remove built packages on cleanafter
This commit is contained in:
parent
3549aeca26
commit
b5b4484c5c
5
clean.go
5
clean.go
|
@ -215,6 +215,9 @@ func cleanAfter(bases []Base) {
|
|||
|
||||
for i, base := range bases {
|
||||
dir := filepath.Join(config.BuildDir, base.Pkgbase())
|
||||
if !isGitRepository(dir) {
|
||||
continue
|
||||
}
|
||||
|
||||
text.OperationInfoln(gotext.Get("Cleaning (%d/%d): %s", i+1, len(bases), cyan(dir)))
|
||||
|
||||
|
@ -223,7 +226,7 @@ func cleanAfter(bases []Base) {
|
|||
text.Errorln(gotext.Get("error resetting %s: %s", base.String(), stderr))
|
||||
}
|
||||
|
||||
if err := show(passToGit(dir, "clean", "-fx")); err != nil {
|
||||
if err := show(passToGit(dir, "clean", "-fx", "--exclude='*.pkg.*'")); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue