fix(scan): fix yum-ps warning Failed to exec which -bash (#1166)

This commit is contained in:
Kota Kanbe
2021-02-07 07:23:12 +09:00
committed by GitHub
parent cd6722017b
commit b4611ae9b7
2 changed files with 4 additions and 1 deletions

View File

@@ -888,6 +888,7 @@ func (l *base) parseGrepProcMap(stdout string) (soPaths []string) {
scanner := bufio.NewScanner(strings.NewReader(stdout))
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())
line = strings.Split(line, ";")[0]
soPaths = append(soPaths, line)
}
return soPaths