Skip to content

az monitor log-analytics workspace show should return exit code 3 on non-existant workspace #12386

@aarroyoc

Description

@aarroyoc

Describe the bug
The command az monitor log-analytics workspace show does not return an exit code of 3 when the namespace does not exist. This is inconsistent of how other show subcommands work, when, as per #6612, they should return 3.

To Reproduce
Run

az monitor log-analytics workspace show -g invent-rg -n invent
echo $?

Where invent-rg and invent are non-existent resources. It returns 1.

Expected behavior
For example, az aks show works as expected:

az aks show --resource-group invent-rg --name invent
echo $?

returns 3

Environment summary
az version output:

azure-cli                          2.1.0

command-modules-nspkg              2.0.3
core                               2.1.0
nspkg                              3.0.4
telemetry                          1.0.4

Python location '/usr/local/Cellar/azure-cli/2.1.0/libexec/bin/python'
Extensions directory '/Users/cxb0290/.azure/cliextensions'

Python (Darwin) 3.8.1 (default, Dec 27 2019, 18:06:00)
[Clang 11.0.0 (clang-1100.0.33.16)]

Legal docs and information: aka.ms/AzureCliLegal



Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/clihats

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions