Skip to content

Commit

Permalink
refactor(dbm-services): ignore mysqldump wanrning log #9138
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and iSecloud committed Jan 20, 2025
1 parent 5a53468 commit 0eaa3af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,14 @@ func dumpIsOk(errLog string) (err error) {
if err != nil {
return err
}
// ignore warning
w := regexp.MustCompile(`[Warning] Using a password on the command line interface can be insecure`)
r := regexp.MustCompile(`Couldn't find table:`)
var lines []string
scanner := bufio.NewScanner(fd)
for scanner.Scan() {
l := scanner.Text()
if !r.MatchString(l) && lo.IsNotEmpty(l) {
if !r.MatchString(l) && lo.IsNotEmpty(l) && !w.MatchString(l) {
lines = append(lines, l)
}
}
Expand Down

0 comments on commit 0eaa3af

Please sign in to comment.