Skip to content

Confounding error message when providing blank resource group #7256

@yevster

Description

@yevster

Describe the bug
When the resource group name provided to az acr create is an empty string, a confusing and most unhelpful message appears:

The api-version '2017-10-01' is invalid. The supported versions are '2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.

To Reproduce
Invoke as follows:

 az acr create --location eastus --sku Basic --resource-group "" --name spin0kub

The empty value in quotes could be in a variable that a hapless scripter forgot to assign.

Expected Behavior
An error message along the lines of "--resource-group parameter may not be empty".

Environment summary
Installed via apt / azure-cli (2.0.45)/ Ubuntu 18.04LTS (x64) / bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions