1
0
Fork 0

Match also centos mask as string

master
dump_stack() 2023-04-05 18:04:22 +00:00
parent b98abe4a83
commit fcfbf4f36d
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 4 additions and 2 deletions

View File

@ -213,8 +213,10 @@ func matchCentOSDevelPkg(container, mask string, generic bool) (
return
}
for _, k := range r.FindAll([]byte(output), -1) {
pkgs = append(pkgs, string(k))
for _, pkg := range strings.Fields(output) {
if r.MatchString(pkg) || strings.Contains(pkg, mask) {
pkgs = append(pkgs, pkg)
}
}
return