Skip to content

Commit

Permalink
Fix retrieve unpackaged so it is usable in metadeploy (#3566)
Browse files Browse the repository at this point in the history
retrieve unpackaged messes with the package_xml in init_options which
breaks its use in Metadeploy (because _init_options ends up being called
twice)

Re-write options so it is not overwriting the valid value with an
invalid one.

Co-authored-by: David Reed <[email protected]>
Co-authored-by: James Estevez <[email protected]>
  • Loading branch information
3 people authored May 20, 2024
1 parent fe6e81c commit 56e1066
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cumulusci/tasks/salesforce/RetrieveUnpackaged.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ def _init_options(self, kwargs):
super(RetrieveUnpackaged, self)._init_options(kwargs)

if "package_xml" in self.options:
self.options["package_xml_path"] = self.options["package_xml"]
with open(self.options["package_xml_path"], "r") as f:
self.options["package_xml"] = f.read()
with open(self.options["package_xml"], "r") as f:
self.options["package_xml_content"] = f.read()

def _get_api(self):
return self.api_class(
self, self.options["package_xml"], self.options.get("api_version")
self, self.options["package_xml_content"], self.options.get("api_version")
)

0 comments on commit 56e1066

Please sign in to comment.