Skip to content

az bicep decompile: add exit code for warning errors #25009

@juju4

Description

@juju4

Related command
az bicep decompile

Is your feature request related to a problem? Please describe.
Similar to PowerShell/PSScriptAnalyzer#840
az bicep decompile seems to always return exit code 0 or at least for warnings
there should be an option to detect warning so it can update status appropriately in azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

I'm using this command to validate my ARM templates as part of azure pipelines.

Describe the solution you'd like
Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...)

Describe alternatives you've considered
An alternative would be trapping command output and search for warning.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions