mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 02:44:58 +00:00
Improve: "not found" error handling
This commit is contained in:
@@ -212,6 +212,9 @@ func (e *extractor) search() (types.LocalTimeline, error) {
|
|||||||
|
|
||||||
// double-check it stopped correctly
|
// double-check it stopped correctly
|
||||||
if err = cmd.Wait(); err != nil {
|
if err = cmd.Wait(); err != nil {
|
||||||
|
if exiterr, ok := err.(*exec.ExitError); ok && exiterr.ExitCode() == 1 {
|
||||||
|
return nil, errors.New("Found nothing")
|
||||||
|
}
|
||||||
return nil, errors.Wrap(err, "grep subprocess error")
|
return nil, errors.Wrap(err, "grep subprocess error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user