Skip to content

Commit

Permalink
Merge pull request #3482 from ActiveState/DX-2892
Browse files Browse the repository at this point in the history
Ignore log file for current process
  • Loading branch information
MDrakos authored Sep 6, 2024
2 parents 162fb93 + 05c344f commit dd41b0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/runners/export/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit dd41b0c

Please sign in to comment.