您如何逃脱管道'|'当从git bash使用azure-cli时

问题描述

在Git Bash中使用azure-cli时遇到问题

命令:

az webapp create --name app-name --resource-group rg-name --plan plan-name --runtime "node|10.14"

错误

'10.14' is not recognized as an internal or external command,operable program or batch file.

illustration shows error results as seen on Git Bash

更新:发现相关问题https://github.com/Azure/azure-cli/issues/13866

解决方法

这很奇怪。我在Windows 10的Azure Cloud Shell的Bash或WSL或Git Bash中尝试了此命令。一切正常。

云壳 enter image description here

Git Bash enter image description here

在这种情况下,您可以考虑使用az upgrade更新CLI安装或重新安装Azure CLIgit bash。另外,您可以在输入"node|10.14"时检查字符格式是否正确。