Skip to content

Commit

Permalink
getGrepType: fix typo
Browse files Browse the repository at this point in the history
I really shouldn't touch my computer on the couch.

Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Oct 31, 2021
1 parent f6b9485 commit a7275f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vgrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (v *vgrep) getGrepType() (string) {
versionRegex := regexp.MustCompile(`\(([[:alpha:]]+) grep`)
// versionRegex matches to ["(BSD grep)", "BSD"], return "BSD"
submatch := versionRegex.FindStringSubmatch(versionString)
if len(out) < 2 {
if len(submatch) < 2 {
return ""
}
return submatch[1]
Expand Down

0 comments on commit a7275f1

Please sign in to comment.