Azure / Azure/azure-cli

az bicep build --pattern throws error

Open
#31,502 6 comments 2 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign Auto-Resolve Azure Deployments customer-reported feature-request Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.