Skip to content

Commit

Permalink
Fix the exit code of az group deployment validate when the verificati…
Browse files Browse the repository at this point in the history
…on fails
  • Loading branch information
zhoxing-ms committed Jan 15, 2020
1 parent 49a3c3e commit 009bdaa
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 128 deletions.
4 changes: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

**ARM**

* Fix issue #10279: The exit code of `az group deployment validate` is 0 when the verification fails

**IoT Central**

* Support app creation/update with the new sku name ST0, ST1, ST2.
Expand Down
5 changes: 4 additions & 1 deletion src/azure-cli/azure/cli/command_modules/resource/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ def _deploy_arm_template_core(cli_ctx, resource_group_name,

smc = get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, aux_subscriptions=aux_subscriptions)
if validate_only:
return sdk_no_wait(no_wait, smc.deployments.validate, resource_group_name, deployment_name, properties)
response = sdk_no_wait(no_wait, smc.deployments.validate, resource_group_name, deployment_name, properties)
if response and response.error:
raise CLIError(response.error)
return response
return sdk_no_wait(no_wait, smc.deployments.create_or_update, resource_group_name, deployment_name, properties)


Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 009bdaa

Please sign in to comment.