Skip to content

Commit

Permalink
Added check_output true to get the logs of metadata retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmi2506 committed May 24, 2024
1 parent 56e1066 commit f4494e1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cumulusci/tasks/salesforce/sourcetracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def retrieve_components(
api_version: str,
project_config: BaseProjectConfig = None,
retrieve_complete_profile: bool = False,
check_output: bool = False,
):
"""Retrieve specified components from an org into a target folder.
Expand Down Expand Up @@ -290,7 +291,7 @@ def retrieve_components(
_write_manifest(components, package_xml_path, api_version)

# Retrieve specified components in DX format
sfdx(
p = sfdx(
"force:source:retrieve",
access_token=org_config.access_token,
log_note="Retrieving components",
Expand All @@ -302,7 +303,7 @@ def retrieve_components(
"-w",
"5",
],
capture_output=False,
capture_output=check_output,
check_return=True,
env={"SFDX_INSTANCE_URL": org_config.instance_url},
)
Expand Down Expand Up @@ -348,6 +349,10 @@ def retrieve_components(
package_xml = PackageXmlGenerator(**package_xml_opts)()
with open(os.path.join(target, "package.xml"), "w", encoding="utf-8") as f:
f.write(package_xml)
if check_output:
return p.stdout_text.read()
else:
return None


class RetrieveChanges(ListChanges, BaseSalesforceApiTask):
Expand Down

0 comments on commit f4494e1

Please sign in to comment.