1
0
Fork 0

Match also as string

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

View File

@ -182,10 +182,10 @@ func matchDebImagePkg(container, mask string) (pkgs []string, err error) {
return
}
kernels := r.FindAll([]byte(output), -1)
for _, k := range kernels {
pkg := string(k)
pkgs = append(pkgs, pkg)
for _, pkg := range strings.Fields(output) {
if r.MatchString(pkg) || strings.Contains(pkg, mask) {
pkgs = append(pkgs, pkg)
}
}
return