-
Notifications
You must be signed in to change notification settings - Fork 581
Description
Description
It feels like the ouput of Fake build (probably the line with the version) is detected as a Build error
At the very begining of the the build (even before the restore step) the build goes from Green to red
Expected behavior
The build should not detect "Some" lines as error when it feels like it is just "Verbosity"
Actual behavior
As it is delicate for me to output code from the company here is what the build log looks like
Known workarounds
Manually open the log for each TeamCity build ...
Related information
- Operating system - Win2016
- The code targets, for the CLI, that's a good question, i use
fake-clias adotnet-tool - Severity : Critical (cannot dissociate Success or failure)
- Version of FAKE 5.4.x
the script is ran using a Powershell PS1 :
function Invoke-FakeBuild([string]$TargetName) {
$fakeBuildArgs = "./$($fakeCli) -v run $($BuildScript) --no-cache --parallel 8 --target $($TargetName)"
if ($SkipUnitTests -or $SkipIntegrationTests) {
$fakeBuildArgs += " --"
# Only set switch this for testing Pack/Push for the Fake script
if ($SkipUnitTests) {
$fakeBuildArgs += " --skip-unit-tests"
}
# Only set switch this for testing Pack/Push for the Fake script
if ($SkipIntegrationTests) {
$fakeBuildArgs += " --skip-integration-tests"
}
}
Write-Host "Execution expression : '$($fakeBuildArgs)'"
Invoke-Expression $fakeBuildArgs
}
Invoke-FakeBuild -TargetName $TargetName
As you can see i do not read the exit code of the Fake Build in order to let the powershell return the good exit good.
So far it ALWAYS return 0 (so in this scenario it should not affect the build result)
Finding the cullprit
Redirect StdErr to another stream :
Invoke-Expression "$($fakeBuildArgs) 2>error.log"
> cat .\error.log
FAKE 5 - F# Make (5.4.0)
not sure this is this line, because i still don't find where it is being printed out
https://github.com/fsharp/FAKE/blob/staging_5_4/src/app/Fake.Runtime/Environment.fs#L12
