Skip to content

Commit 5a903d8

Browse files
committed
Addressing comments
1 parent 88954c5 commit 5a903d8

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed

src/azure-cli/azure/cli/command_modules/resource/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def load_arguments(self, _):
535535
c.argument('skip_resource_name_params', action='store_true')
536536
c.argument('skip_all_params', action='store_true')
537537
c.argument('resource_ids', nargs='+', options_list='--resource-ids')
538-
c.argument('export_format', options_list=['--export-format'], help="The format of the exported template. Allowed values: 'json', 'arm', 'bicep'. Defaults to 'json'.")
538+
c.argument('export_format', help="The format of the exported template. Allowed values: 'json', 'arm', 'bicep'. Defaults to 'json'.")
539539

540540
with self.argument_context('group create') as c:
541541
c.argument('rg_name', options_list=['--name', '--resource-group', '-n', '-g'],

src/azure-cli/azure/cli/command_modules/resource/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ def export_group_as_template(
16911691
elif export_format.lower() == "bicep":
16921692
export_template_request = ExportTemplateRequest(resources=resources, options=options, output_format="Bicep")
16931693
else:
1694-
raise CLIError('az resource: error: argument --export-format: invalid ExportFormat value: \'%s\'' % export_format)
1694+
raise InvalidArgumentValueError('az resource: error: argument --export-format: invalid ExportFormat value: \'%s\'' % export_format)
16951695

16961696
# Exporting a resource group as a template is async since API version 2019-08-01.
16971697
if cmd.supported_api_version(min_api='2019-08-01'):

0 commit comments

Comments
 (0)