Remove: --grep-args

Can be used to break the tool, and I actually never had an use-case
This commit is contained in:
Yoann La Cancellera
2023-11-21 16:01:12 +01:00
committed by Sveta Smirnova
parent 3fae43123e
commit 27654e9853
2 changed files with 2 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ func execGrepAndIterate(path, compiledRegex string, stdout chan<- string) error
logger.Warn().Msg("On Darwin systems, use 'pt-galera-log-explainer --grep-cmd=ggrep' as it requires grep v3")
}
cmd := exec.Command(CLI.GrepCmd, CLI.GrepArgs, compiledRegex, path)
cmd := exec.Command(CLI.GrepCmd, "-P", compiledRegex, path)
out, _ := cmd.StdoutPipe()
defer out.Close()

View File

@@ -45,8 +45,7 @@ var CLI struct {
Version kong.VersionFlag
GrepCmd string `help:"'grep' command path. Could need to be set to 'ggrep' for darwin systems" default:"grep"`
GrepArgs string `help:"'grep' arguments. perl regexp (-P) is necessary. -o will break the tool" default:"-P"`
GrepCmd string `help:"'grep' command path. Could need to be set to 'ggrep' for darwin systems" default:"grep"`
}
func main() {