Skip to content

Awk command not working in latest Azure cli version #30450

@JoanaPedrosoDiconium

Description

@JoanaPedrosoDiconium

Describe the bug

Hello,

We have a Github action in which we install the latest version of Azure CLI and try to run a inlineScript that includes the following command:

OUTPUT=$(echo $MY_JSON_VARIABLE | jq -r .scopeMapId | awk -F'\/' '{ print $9 }')

And we get this error:

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.67.0 /opt/github/actions-runner/_work/_temp/AZ_CLI_GITHUB_ACTION_1732898353757.sh: line 2: awk: command not found

I saw that there was an issue created for the -jq command and it was fixed, so wondering if this was already reported somewhere and fixed. If so I'd appreciate it if you linked the issue with the solution!

Thank you!

Related command

jq -r .scopeMapId | awk -F'/' '{ print $9 }'

Errors

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.67.0 /opt/github/actions-runner/_work/_temp/AZ_CLI_GITHUB_ACTION_1732898353757.sh: line 2: awk: command not found

Issue script & Debug output

.

Expected behavior

awk command should work with latest version of Azure CLI

Environment Summary

Job step uses: azure/CLI@v2 image.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions