Skip to content

Commit f32d3d0

Browse files
author
wes-ncino
committed
fix(): report component errors
1 parent 223ce0f commit f32d3d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sfdclib/metadata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def check_deploy_status(self, async_process_id):
110110

111111
unit_test_errors = []
112112
deployment_errors = []
113-
if state == 'Failed':
113+
failed_count = result.find('mt:numberComponentErrors', self._XML_NAMESPACES)
114+
if state == 'Failed' or failed_count > 0:
114115
# Deployment failures
115116
failures = result.findall('mt:details/mt:componentFailures', self._XML_NAMESPACES)
116117
for failure in failures:
@@ -134,7 +135,7 @@ def check_deploy_status(self, async_process_id):
134135

135136
deployment_detail = {
136137
'total_count': result.find('mt:numberComponentsTotal', self._XML_NAMESPACES).text,
137-
'failed_count': result.find('mt:numberComponentErrors', self._XML_NAMESPACES).text,
138+
'failed_count': failed_count.text,
138139
'deployed_count': result.find('mt:numberComponentsDeployed', self._XML_NAMESPACES).text,
139140
'errors': deployment_errors
140141
}

0 commit comments

Comments
 (0)