fix: adb logcat clear argument

This commit is contained in:
lilong.129
2023-04-14 20:28:04 +08:00
parent e7e5837e48
commit 2d3a4985ed
2 changed files with 2 additions and 2 deletions

View File

@@ -329,7 +329,7 @@ func (ad *adbDriver) StartCaptureLog(identifier ...string) (err error) {
log.Info().Msg("start adb log recording")
// clear logcat
if _, err = ad.adbClient.RunShellCommand("logcat", "--clear"); err != nil {
if _, err = ad.adbClient.RunShellCommand("logcat", "-c"); err != nil {
return err
}

View File

@@ -328,7 +328,7 @@ func (l *AdbLogcat) CatchLogcat() (err error) {
}
// clear logcat
if err = myexec.RunCommand("adb", "-s", l.serial, "logcat", "--clear"); err != nil {
if err = myexec.RunCommand("adb", "-s", l.serial, "shell", "logcat", "-c"); err != nil {
return
}