Skip to content

az bicep build --pattern throws error #31502

@frits-becker

Description

@frits-becker

Describe the bug

In bicep version 0.34.1 '--pattern' was added and in the latest release (v0.35.1), the output dir param was added.

So I just tried it on a agent and my local laptop with 'az bicep build --pattern './**/*.bicep', I get the error 'the following arguments are required: --file/-f'. I also get the error when I add '--outdir ./folder'

I updated the az cli to v2.72.0 and bicep to v0.35.1.

This works correctly if I use it on powershell and install bicep through winget. and call the same as above, without the 'az'.

So it looks like Azure CLI does checks for the bicep library, that is not needed and throws an error now that there is a new functionallity.

Related command

az bicep build --pattern './**/*.bicep

Errors

the following arguments are required: --file/-f

Issue script & Debug output

Expected behavior

I expect that -f is not mandatory anymore.

Environment Summary

azure-cli 2.72.0 *

core 2.72.0 *
telemetry 1.1.0

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\frits.azure'
Extensions directory 'C:\Users\frits.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure Deploymentsaz deployment/bicep/stack/deployment-scripts/ts/group exportService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions