replace warnings even if no newline is found

This commit is contained in:
Giovanni Harting 2023-10-13 21:04:06 +02:00
parent 44c4493500
commit 5c01e9afc9
2 changed files with 2 additions and 2 deletions

View File

@ -454,7 +454,7 @@ func (p *ProtoPackage) isAvailable(h *alpm.Handle) bool {
case p.DBPackage != nil && len(p.DBPackage.Packages) > 0:
pkg, err = dbs.FindSatisfier(p.DBPackage.Packages[0])
default:
cmd := exec.Command("unbuffer", "pacsift", "--exact", "--base="+p.Pkgbase, "--repo="+p.Repo.String(),
cmd := exec.Command("unbuffer", "pacsift", "--exact", "--base="+p.Pkgbase, "--repo="+p.Repo.String(), //nolint:gosec
"--sysroot="+filepath.Join(conf.Basedir.Work, chrootDir, pristineChroot))
var res []byte
res, err = cmd.Output()

View File

@ -51,7 +51,7 @@ var (
reReplaceSpecialChars = regexp.MustCompile(`(?m)[^a-zA-Z0-9_\-.]`)
reReplaceUnderscore = regexp.MustCompile(`(?m)[_\-]{2,}`)
reReplaceTree = regexp.MustCompile(`(?m)^tree$`)
reReplacePacsiftWarning = regexp.MustCompile(`(?m)^warning:.*\n`)
reReplacePacsiftWarning = regexp.MustCompile(`(?m)^warning:.*\n*`)
)
type Conf struct {