diff --git a/src/task/RunResharperCodeAnalysisTool.ps1 b/src/task/RunResharperCodeAnalysisTool.ps1 index e3ffa62..a58c364 100644 --- a/src/task/RunResharperCodeAnalysisTool.ps1 +++ b/src/task/RunResharperCodeAnalysisTool.ps1 @@ -114,7 +114,9 @@ $arguments = """$solutionOrProjectFullPath"" /o:""$inspectCodeResultsPath"" ""$a Write-Output "Invoking InspectCode.exe using arguments $arguments" $stdOutputFile = "./stdout.txt" -Start-Process -FilePath $inspectCodeExePath -ArgumentList $arguments -Wait -RedirectStandardOutput $stdOutputFile +$process = Start-Process -FilePath $inspectCodeExePath -ArgumentList $arguments -PassThru -RedirectStandardOutput $stdOutputFile +$process.WaitForExit() + if(Test-Path $stdOutputFile) { $stdOutputFileContent = Get-Content "$stdOutputFile" Write-Output $stdOutputFileContent