From 05c344fab7ca6abee22f0f0e512bfa3fc1dd9048 Mon Sep 17 00:00:00 2001 From: mdrakos Date: Fri, 6 Sep 2024 14:33:15 -0700 Subject: [PATCH] Ignore log file for current process --- internal/runners/export/log.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/runners/export/log.go b/internal/runners/export/log.go index c9c0755171..b895cd138d 100644 --- a/internal/runners/export/log.go +++ b/internal/runners/export/log.go @@ -101,6 +101,10 @@ func (l *Log) Run(params *LogParams) (rerr error) { } func ignoreLogFile(logFile string) (bool, error) { + if strings.EqualFold(filepath.Base(logFile), logging.FileName()) { + return true, nil + } + file, err := os.Open(logFile) if err != nil { return false, errs.Wrap(err, "failed to open log file")