Issue Running az cli inline command on windows agent
Closed this issue · 3 comments
totalitydevelopment commented
I have task working fine on an Ubuntu agent as per:
some-task:
runs-on: ubuntu-latest
steps:
- name: Do something
uses: azure/CLI@v1
with:
azcliversion: 2.40.0
inlineScript: az apim api ....etc
When trying the following however:
build:
runs-on: windows-latest
environment: Development
steps:
- name: Do something
uses: azure/CLI@v1
with:
azcliversion: 2.40.0
inlineScript: call az somecall....
I am receiving the error:
Error: Please use Linux based OS as a runner.
The documentation isn't quite clear for me:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-cli-v1?view=azure-pipelines
Suggests just adding "call" as I have done.
t-dedah commented
Hi @totalitydevelopment we do not support windows user agents which is causing this error for you. Also the documentation you are referring isn't for this action but for a different azure pipeline task. we will update our readme to mention this too.
t-dedah commented
Feel free to reopen the issue if you have any further questions
totalitydevelopment commented
Thank you for the clarification!!