Skip to content

Commit

Permalink
Merge pull request #1107 from Morganamilo/igorediffret
Browse files Browse the repository at this point in the history
Ignore errors while diffing
  • Loading branch information
Jguer authored Nov 3, 2019
2 parents 3fef09e + 3c996e5 commit bbc7cbb
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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...))
}
}

Expand Down

0 comments on commit bbc7cbb

Please sign in to comment.