情况
我的自托管 Windows 代理运行来自 Azure DevOps 的管道。为了管理 Azure 中的资源,我想使用 Azure CLI 任务。即使在前面的步骤中安装了 Azure CLI,AzureCLI 任务也会失败。
我有两个从我的管道运行的脚本。
2021-03-05T14:50:02.5986237Z ##[error]Azure CLI 2.x is not installed on this machine.
2021-03-05T14:50:02.6391547Z ##[error]Script failed with error: Error: Unable to locate executable file: 'az'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for …Run Code Online (Sandbox Code Playgroud)