Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbosity overridden, even though System.Debug = 'false' #77

Open
rpriest1260 opened this issue Jul 7, 2023 · 1 comment
Open

Verbosity overridden, even though System.Debug = 'false' #77

rpriest1260 opened this issue Jul 7, 2023 · 1 comment

Comments

@rpriest1260
Copy link

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

@nils-a
Copy link
Member

nils-a commented Sep 19, 2023

Back when that feature was introduced (see #69 (comment)), 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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants