Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
az_cli_universal_dependency: Enhance error messaging (#934)
1. If the `azure-devops` extension is not installed, provide a URL with installation instructions. This link can directly be clicked in many shell environments. 2. If an error occurs running the Azure CLI then show the error message to the user. This often has helpful instructions for what needs to be done to resolve the error. Example shown below. Before: ``` raise Exception("{0} failed with Return Code: {1}".format(cmd, returncode_str)) Exception: az artifacts universal download --organization https://dev.azure.com/Organization/ --feed FEED --name NAME --version 0.0.1 --path "PATH" failed with Return Code: 0x00000001 ``` After: ``` raise Exception( Exception: Command "az artifacts universal download --organization https://dev.azure.com/Organization/ --feed FEED --name NAME --version 0.0.1 --path "PATH"" failed with 1. ERROR: Failed to update Universal Packages tooling. Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information. ``` Signed-off-by: Michael Kubacki <[email protected]>
- Loading branch information