Skip to content

Commit

Permalink
Avoid error-info getting event log (#817)
Browse files Browse the repository at this point in the history
When getting event log in single project repositories, the following
message is written to the log as info:
Error getting event log from container: Cannot overwrite the item
D:\a\GHP-DK\GHP-DK\ContainerEventLog.evtx with itself.

This PR removes this error-info

---------

Co-authored-by: freddydk <[email protected]>
  • Loading branch information
freddydk and freddydk authored Nov 15, 2023
1 parent 15c2d7d commit f63b56a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,11 @@ finally {
Write-Host "Get Event Log from container"
$eventlogFile = Get-BcContainerEventLog -containerName $containerName -doNotOpen
Copy-Item -Path $eventLogFile -Destination $containerEventLogFile
$destFolder = Join-Path $ENV:GITHUB_WORKSPACE $project
Copy-Item -Path $containerEventLogFile -Destination $destFolder
if ($project) {
# Copy event log to project folder if multiproject
$destFolder = Join-Path $ENV:GITHUB_WORKSPACE $project
Copy-Item -Path $containerEventLogFile -Destination $destFolder
}
}
}
catch {
Expand Down

0 comments on commit f63b56a

Please sign in to comment.