From 3c996e52359650d0226c9f0a5ce15b590e392a07 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Wed, 30 Oct 2019 03:46:01 +0000 Subject: [PATCH] Ignore errors while diffing std{out,err} all passed to the call so errors should print just as before, the only difference is now yay will not abort after an error occurs. We always provide a confirmation dialog after viewing diffs so this should be safe. --- install.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/install.go b/install.go index ba01139a..75dd8e4a 100644 --- a/install.go +++ b/install.go @@ -249,7 +249,6 @@ func install(parser *arguments) (err error) { } if len(toDiff) > 0 { - // TODO: PKGBUILD diffs should not return in case of err. Just print and continue err = showPkgbuildDiffs(toDiff, cloned) if err != nil { return err @@ -765,11 +764,7 @@ func showPkgbuildDiffs(bases []Base, cloned stringset.StringSet) error { } else { args = append(args, "--color=never") } - err = show(passToGit(dir, args...)) - if err != nil { - errMulti.Add(err) - continue - } + _ = show(passToGit(dir, args...)) } else { args := []string{"diff"} if useColor { @@ -779,11 +774,7 @@ func showPkgbuildDiffs(bases []Base, cloned stringset.StringSet) error { } args = append(args, "--no-index", "/var/empty", dir) // git always returns 1. why? I have no idea - err := show(passToGit(dir, args...)) - if err != nil { - errMulti.Add(err) - continue - } + _ = show(passToGit(dir, args...)) } }