Skip to content

Can colorization of warnings be controlled? #302

Description

@gabbsmo

Dear Knack team,

This is more of a question from Azure CLI, that use Knack.

When developing a provisioning script for my app that use Entra ID app registration and Azure resources I noticed that in some cases warnings was colored and sometimes not. The script is written in PowerShell.

I opened an issue with Azure CLI and they informed me that this is due to how Knack handles warnings in output.

The default is that a warning is colorized. But if the command output is piped or assigned to a variable, it is not and a 'warning:' prefix is added to the message.

Is it possible for me as a script author to make Azure CLI/Knack always display colorized warnings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions