cake-vso
cake-vso copied to clipboard
Verbosity overridden, even though System.Debug = 'false'
What You Are Seeing?
verbosity set to Diagnostic and overriding task configured setting, even though system.debug = false.
What is Expected?
if System.Debug is not set to 'true', then the verbosity should follow whatever is set in the task.
What version of Cake are you using?
3.0.0
Are you running on a 32 or 64 bit system?
x64
What environment are you running on? Hosted? Custom?
Hosted
How Did You Get This To Happen? (Steps to Reproduce)
using a build in Azure Devops, set System.Debug = false; Run a cake task in a build.
Here is the code in the repository that is causing this. It only checks for the existence of ' System.Debug'. I contend that it should check that the value is actually 'true', before overriding the verbosity setting
const systemDiagnosticsRequested = tl.getVariable('system.debug');
if(systemDiagnosticsRequested) {
$verbosity = 'Diagnostic';
}
Output Log
Back when that feature was introduced (see https://github.com/cake-build/cake-vso/pull/69#issue-678188551), system.debug was a boolean, so it was either false or true.
For this, the given code was adequate.
It seems that now the docs seem to suggest that the string 'true' is also a valid value.
As a workaround, you can try to either use boolean values (i.e. true and false) instead of strings, or use the empty string '' instead of 'false'.