Reputation: 365
I am doing the following tutorial instructions. I using the CLI 2.0 that is integrated in the azure portal. Not the version on my laptop.
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-get-started-php
az webapp create --resource-group xxxx-DevGroup --plan xxxxServicePlan --name hello --runtime "php|7.1" --deployment-local-git
and at the instruction to create the webapp i am getting this error:
'7.1' is not recognized as an internal or external command,
The runtimes 7.0 and 7.1 are supported. I also tried these variations without success.
php|7.1. I also tried php|7.0, "php|7.1" and "php|7.0"
Any pointers to fix this issue would be appreciated
Upvotes: 0
Views: 608
Reputation: 10153
In PowerShell, the | will be seen als a command. Use single quotes to escape your string.
--runtime '"php|7.1"'
Upvotes: 0
Reputation: 83
If you're using PowerShell, you need to do this:
az --% webapp create
The problem is az is escaping your string's bar "node|6.9", the --% disables it.
Upvotes: 4
Reputation: 19223
According to the error log, it seems that you use a older version. You could use az -v
to check version.
I test it on 2.0.7 and Azure Cloud Shell, they all work for me.
I suggest you could upgrade your azure cli version or execute the command on Azure Cloud Shell.
Upvotes: 1