Skip to content

Commit

Permalink
fix(scan): allow exit 1 for no match lsof | grep (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed Jul 6, 2019
1 parent ccb0751 commit 425464f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scan/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ func (l *base) parseGrepProcMap(stdout string) (soPaths []string) {
func (l *base) lsOfListen() (stdout string, err error) {
cmd := `lsof -i -P -n | grep LISTEN`
r := l.exec(util.PrependProxyEnv(cmd), sudo)
if !r.isSuccess() {
if !r.isSuccess(0, 1) {
return "", xerrors.Errorf("Failed to SSH: %s", r)
}
return r.Stdout, nil
Expand Down

0 comments on commit 425464f

Please sign in to comment.